[PATCH] PR16225 - Assert-on-invalid: isa<LabelDecl>(D) && "declaration not instantiated in this scope"

Richard Smith richard at metafoo.co.uk
Wed Jun 5 17:05:28 PDT 2013


  It looks like this can be split into two fixes: one for the changes to lib/Parse/ParseDeclCXX.cpp and test/SemaCXX/class.cpp, and another (depending on the first) for the changes to lib/Sema/SemaTemplateInstantiateDecl.cpp and test/SemaCXX/PR16225.cpp, right?


================
Comment at: lib/Parse/ParseDeclCXX.cpp:921
@@ -921,1 +920,3 @@
+    if (!Template) {
+      SkipUntil(tok::greater, /*StopAtSemi=*/true, /*DontConsume=*/false);
       return true;
----------------
This might stop too early (if there are nested templates) or too late (if the template-id ends with tok::greatergreater). Maybe skip until tok::l_brace?


http://llvm-reviews.chandlerc.com/D920



More information about the cfe-commits mailing list