[cfe-commits] r105465 - /cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
Abramo Bagnara
abramo.bagnara at gmail.com
Fri Jun 4 02:35:39 PDT 2010
Author: abramo
Date: Fri Jun 4 04:35:39 2010
New Revision: 105465
URL: http://llvm.org/viewvc/llvm-project?rev=105465&view=rev
Log:
Don't insert in lexical context implicit definitions of static member instances.
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=105465&r1=105464&r2=105465&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Fri Jun 4 04:35:39 2010
@@ -373,7 +373,8 @@
SemaRef.CheckVariableDeclaration(Var, Previous, Redeclaration);
if (D->isOutOfLine()) {
- D->getLexicalDeclContext()->addDecl(Var);
+ if (!D->isStaticDataMember())
+ D->getLexicalDeclContext()->addDecl(Var);
Owner->makeDeclVisibleInContext(Var);
} else {
Owner->addDecl(Var);
More information about the cfe-commits
mailing list