summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-12-19 02:27:38 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-12-19 02:27:38 +0000
commit503053a737bf1c54899bcc2d1b4c514485e30054 (patch)
tree8589803d4c7bda0e1a3378ca919242170e6a13a1 /clang/lib
parentd59b8323203503ddef5f85ace351ab72d5f88398 (diff)
downloadbcm5719-llvm-503053a737bf1c54899bcc2d1b4c514485e30054.tar.gz
bcm5719-llvm-503053a737bf1c54899bcc2d1b4c514485e30054.zip
Fix assertion failure in self-host (and probably bogus template instantiation
too). When instantiating a direct-initializer, if we find it has zero arguments, produce an empty ParenListExpr rather than returning a null expression. llvm-svn: 170490
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/TreeTransform.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index 52f6c4d4c08..c161d8cfcb2 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -2622,10 +2622,6 @@ ExprResult TreeTransform<Derived>::TransformInitializer(Expr *Init,
Construct->getLocEnd(),
Construct->getType());
- // Treat an empty initializer like none.
- if (NewArgs.empty())
- return SemaRef.Owned((Expr*)0);
-
// Build a ParenListExpr to represent anything else.
SourceRange Parens = Construct->getParenRange();
return getDerived().RebuildParenListExpr(Parens.getBegin(), NewArgs,
OpenPOWER on IntegriCloud