[cfe-commits] Fix for crash with specialization?
Eli Friedman
eli.friedman at gmail.com
Tue Sep 15 17:01:32 PDT 2009
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
-------------- next part --------------
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:
More information about the cfe-commits
mailing list