aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-11-09 17:16:50 +0000
committerDouglas Gregor <dgregor@apple.com>2009-11-09 17:16:50 +0000
commite48319a8a901bc915d48d02b99c62e5f2589dbd9 (patch)
tree0ecab5fb06335d131d686b233e214506ee4163ad /lib/Sema/SemaTemplateInstantiateDecl.cpp
parentd5a2089663d81faee0de031deabc418fa53ecf3b (diff)
When transforming an InitListExpr, if we already computed a non-dependent type for the InitListExpr, keep it
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86559 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 33d262311c..641ea24427 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -188,13 +188,11 @@ Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D) {
Var->setInvalidDecl();
else if (!D->getType()->isDependentType() &&
!D->getInit()->isTypeDependent() &&
- !D->getInit()->isValueDependent() &&
- !isa<InitListExpr>(D->getInit())) {
+ !D->getInit()->isValueDependent()) {
// If neither the declaration's type nor its initializer are dependent,
// we don't want to redo all the checking, especially since the
// initializer might have been wrapped by a CXXConstructExpr since we did
// it the first time.
- // FIXME: The InitListExpr handling here is a hack!
Var->setInit(SemaRef.Context, Init.takeAs<Expr>());
}
else if (ParenListExpr *PLE = dyn_cast<ParenListExpr>((Expr *)Init.get())) {