]> granicus.if.org Git - clang/commitdiff
Revert change accidentally committed in r191150.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 23 Sep 2013 23:12:22 +0000 (23:12 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 23 Sep 2013 23:12:22 +0000 (23:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191237 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplateInstantiateDecl.cpp

index d712cec2204882134014b6556402e21dfaf74ff9..e03e8c55c9af18ec4cad6c6e69e585e33fda7aea 100644 (file)
@@ -3372,9 +3372,7 @@ void Sema::BuildVariableInstantiation(
       OldVar->isPreviousDeclInSameBlockScope());
   NewVar->setAccess(OldVar->getAccess());
 
-  // For local variables, inherit the 'used' and 'referenced' flags from the
-  // primary template.
-  if (OldVar->getLexicalDeclContext()->isFunctionOrMethod()) {
+  if (!OldVar->isStaticDataMember()) {
     NewVar->setIsUsed(OldVar->isUsed(false));
     NewVar->setReferenced(OldVar->isReferenced());
   }