summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-08 07:24:58 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-08 07:24:58 +0000
commit86d142a80113e9e1d11996f7d5bd9baecfd5a69f (patch)
treebcd566f2c7f57438bf8210308e750e62486114f4 /clang/lib/Sema/SemaExpr.cpp
parent662efc91852b5fb3abda0ecc4ad3550c2f8a799f (diff)
downloadbcm5719-llvm-86d142a80113e9e1d11996f7d5bd9baecfd5a69f.tar.gz
bcm5719-llvm-86d142a80113e9e1d11996f7d5bd9baecfd5a69f.zip
For instantiations of static data members of class templates, keep
track of the kind of specialization or instantiation. Also, check the scope of the specialization and ensure that a specialization declaration without an initializer is not a definition. llvm-svn: 83533
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 3bd72d07d2e..c9525f39e55 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -6209,11 +6209,9 @@ void Sema::MarkDeclarationReferenced(SourceLocation Loc, Decl *D) {
if (VarDecl *Var = dyn_cast<VarDecl>(D)) {
// Implicit instantiation of static data members of class templates.
- // FIXME: distinguish between implicit instantiations (which we need to
- // actually instantiate) and explicit specializations.
- // FIXME: extern templates
if (Var->isStaticDataMember() &&
- Var->getInstantiatedFromStaticDataMember())
+ Var->getInstantiatedFromStaticDataMember() &&
+ Var->getTemplateSpecializationKind() == TSK_ImplicitInstantiation)
PendingImplicitInstantiations.push_back(std::make_pair(Var, Loc));
// FIXME: keep track of references to static data?
OpenPOWER on IntegriCloud