Fix for PR5710: make sure to put function template specializations into the
DeclContext, so they don't completely disappear from the AST.
I don't particularly like this fix, but I don't see any obviously better way
to deal with it, and I think it's pretty clearly an improvement; comments
welcome.
llvm-svn: 90835
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index f276faf..c557e61 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/lib/AST/DeclBase.cpp
@@ -741,6 +741,9 @@
// from being visible?
if (isa<ClassTemplateSpecializationDecl>(D))
return;
+ if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
+ if (FD->isFunctionTemplateSpecialization())
+ return;
DeclContext *PrimaryContext = getPrimaryContext();
if (PrimaryContext != this) {