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

Hans Wennborg hans at chromium.org
Wed Jun 5 06:59:45 PDT 2013


  Thanks! I'm not familiar with the template code, so someone else should take a look too. I've added two minor comments.


================
Comment at: test/SemaCXX/PR16225.cpp:6
@@ +5,3 @@
+template<typename C> void g(C*) {
+  struct LocalStruct : UnkonwnBase<Mumble, C> { };  // expected-error {{unknown template name 'UnkonwnBase'}}
+  f<LocalStruct>();  // expected-warning {{template argument uses local type 'LocalStruct'}}
----------------
feel free to correct my typo here :) s/Unkonwn/Unknown/g

================
Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3553
@@ -3552,1 +3552,3 @@
 
+  if (D->isInvalidDecl())
+    return 0;
----------------
indentation looks off here


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



More information about the cfe-commits mailing list