summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 66e73f99e90..98d1f4c6af5 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -5780,10 +5780,17 @@ void Sema::MarkDeclarationReferenced(SourceLocation Loc, Decl *D) {
}
if (VarDecl *Var = dyn_cast<VarDecl>(D)) {
- (void)Var;
- // FIXME: implicit template instantiation
+ // Implicit instantiation of static data members of class templates.
+ // FIXME: distinguish between implicit instantiations (which we need to
+ // actually instantiate) and explicit specializations.
+ if (Var->isStaticDataMember() &&
+ Var->getInstantiatedFromStaticDataMember())
+ PendingImplicitInstantiations.push_back(std::make_pair(Var, Loc));
+
// FIXME: keep track of references to static data?
+
D->setUsed(true);
- }
+ return;
+}
}
OpenPOWER on IntegriCloud