aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-07-27 17:43:39 +0000
committerDouglas Gregor <dgregor@apple.com>2009-07-27 17:43:39 +0000
commit65b90055dd30cfb83d8344ff62ed428257431be4 (patch)
tree188271aea5db7c5c2a7ddab47298a4c25b58ce89 /lib/Sema/SemaTemplateInstantiateDecl.cpp
parent696798febaf1f69020cdf7474b91e71736c5aa69 (diff)
When instantiating a variable without an initializer, call
ActOnUninitializedDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77211 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index a6513f1672..b04b63523d 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -146,9 +146,8 @@ Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D) {
else
SemaRef.AddInitializerToDecl(Sema::DeclPtrTy::make(Var), move(Init),
D->hasCXXDirectInitializer());
- } else {
- // FIXME: Call ActOnUninitializedDecl? (Not always)
- }
+ } else if (!Var->isStaticDataMember() || Var->isOutOfLine())
+ SemaRef.ActOnUninitializedDecl(Sema::DeclPtrTy::make(Var), false);
// Link instantiations of static data members back to the template from
// which they were instantiated.