From 90618ff0b53f063a880c4933d44c70d6c1cb8dc0 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 23 Sep 2013 23:12:22 +0000 Subject: [PATCH] Revert change accidentally committed in r191150. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191237 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaTemplateInstantiateDecl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index d712cec220..e03e8c55c9 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -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()); } -- 2.50.1