================
Comment at: lib/Parse/ParseDecl.cpp:2764
@@ +2763,3 @@
+          getCurScope()->isTemplateParamScope() &&
+          DSContext == DSC_template_type_arg) {
+        TypeRep = Actions.ActOnDelayedDefaultTemplateArg(
----------------
Perhaps move the `DSContext == DSC_template_type_arg` check before the calls to 
`getLangOpts()` ? It should be a little cheaper.

================
Comment at: lib/Sema/SemaDecl.cpp:358
@@ +357,3 @@
+    return NestedNameSpecifier::Create(Context, SubNNS, ND);
+  else if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(DC))
+    return NestedNameSpecifier::Create(Context, SubNNS, RD->isTemplateDecl(),
----------------
Perhaps `auto RD = dyn_cast<CXXRecordDecl(DC))` ?

================
Comment at: lib/Sema/SemaDecl.cpp:366
@@ +365,3 @@
+                                                SourceLocation NameLoc) {
+  Diag(NameLoc, diag::ext_ms_delayed_template_argument) << &II;
+
----------------
Perhaps a comment as to why we are emitting this diagnostic?

http://reviews.llvm.org/D3995



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to