Attached prevents the following from crashing:
template<typename _CharT> struct A {int x();};
template<> int A<char>::x() { return 1; }

Does the patch look close to correct, or is the issue more fundamental?

-Eli
Index: lib/Sema/SemaDecl.cpp
===================================================================
--- lib/Sema/SemaDecl.cpp       (revision 81915)
+++ lib/Sema/SemaDecl.cpp       (working copy)
@@ -1724,6 +1724,9 @@
       return DeclPtrTy();
     }
 
+    if (RequireCompleteDeclContext(D.getCXXScopeSpec()))
+      return DeclPtrTy();
+
     PrevDecl = LookupQualifiedName(DC, Name, LookupOrdinaryName, true);
 
     // C++ 7.3.1.2p2:
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to