Improve support for static data member templates. This revision still has at least one bug, as it does not respect the variable template specialization hierarchy well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188969 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 9dad47f..9f2e757 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -5333,18 +5333,13 @@
// If we are providing an explicit specialization of a static variable
// template, make a note of that.
if (PrevVarTemplate && PrevVarTemplate->getInstantiatedFromMemberTemplate())
- NewTemplate->setMemberSpecialization();
+ PrevVarTemplate->setMemberSpecialization();
// Set the lexical context of this template
NewTemplate->setLexicalDeclContext(CurContext);
if (NewVD->isStaticDataMember() && NewVD->isOutOfLine())
NewTemplate->setAccess(NewVD->getAccess());
- if (PrevVarTemplate)
- mergeDeclAttributes(NewVD, PrevVarTemplate->getTemplatedDecl());
-
- AddPushedVisibilityAttribute(NewVD);
-
PushOnScopeChains(NewTemplate, S);
AddToScope = false;