summaryrefslogtreecommitdiffstats
path: root/clang/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
commitd3d9306275962ebf8e471f0525bebc4530f8513d (patch)
tree168906b487abf9c67d062b20218017b383654ff8 /clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
parent968ecd9888c15e00348701bcca5f8f6431ebccee (diff)
downloadbcm5719-llvm-d3d9306275962ebf8e471f0525bebc4530f8513d.tar.gz
bcm5719-llvm-d3d9306275962ebf8e471f0525bebc4530f8513d.zip
When transforming an InitListExpr, if we already computed a non-dependent type for the InitListExpr, keep it
llvm-svn: 86559
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiateDecl.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 33d262311c8..641ea244278 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/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())) {
OpenPOWER on IntegriCloud