r191237 - Revert change accidentally committed in r191150.

Richard Smith richard-llvm at metafoo.co.uk
Mon Sep 23 16:12:22 PDT 2013


Author: rsmith
Date: Mon Sep 23 18:12:22 2013
New Revision: 191237

URL: http://llvm.org/viewvc/llvm-project?rev=191237&view=rev
Log:
Revert change accidentally committed in r191150.

Modified:
    cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp

Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp?rev=191237&r1=191236&r2=191237&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Mon Sep 23 18:12:22 2013
@@ -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());
   }





More information about the cfe-commits mailing list