================
Comment at: lib/AST/ASTDiagnostic.cpp:1131-1137
@@ +1130,9 @@
+    if (Iter.isEnd() && ArgExpr->isValueDependent()) {
+      TemplateArgument::ArgKind Kind = Iter.getDesugar().getKind();
+      if (Kind == TemplateArgument::Integral) {
+        Int = Iter.getDesugar().getAsIntegral();
+      } else if (Kind == TemplateArgument::Expression) {
+        ArgExpr = Iter.getDesugar().getAsExpr();
+        Int = ArgExpr->EvaluateKnownConstInt(Context);
+      } else {
+        llvm_unreachable("Unexpected template argument kind");
----------------
Richard Trieu wrote:
> Why did you change from a switch statement to an if chain here?
The entire function was coded in Phabricator and was missing breaks. After 
adding those it seem to be a fair bit longer than needed. Do you want me to 
change it?

http://reviews.llvm.org/D4226



_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to