diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-06-17 23:14:26 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-06-17 23:14:26 +0000 |
commit | ebada077d93b0fe4134b347a90efec665b629b25 (patch) | |
tree | fc8a35501d61d350fe217f80b702858eb4d6eb28 /clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | |
parent | 6b98f7129f535bba826bb7dfa3a7fd6297330448 (diff) | |
download | bcm5719-llvm-ebada077d93b0fe4134b347a90efec665b629b25.tar.gz bcm5719-llvm-ebada077d93b0fe4134b347a90efec665b629b25.zip |
Given Decl::isUsed() a flag indicating when to consider the "used"
attribute as part of the calculation. Sema::MarkDeclReferenced(), and
a few other places, want only to consider the "used" bit to determine,
e.g, whether to perform template instantiation. Fixes a linkage issue
with Boost.Serialization.
llvm-svn: 106252
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index b7059e57523..1b28579e61d 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -361,7 +361,9 @@ Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D) { Var->setLexicalDeclContext(D->getLexicalDeclContext()); Var->setAccess(D->getAccess()); - Var->setUsed(D->isUsed()); + + if (!D->isStaticDataMember()) + Var->setUsed(D->isUsed(false)); // FIXME: In theory, we could have a previous declaration for variables that // are not static data members. |