summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplateInstantiate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiate.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index 9126d2a262e..7b2d24b5bf1 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp
@@ -591,7 +591,8 @@ namespace {
OwningExprResult VisitCXXTemporaryObjectExpr(CXXTemporaryObjectExpr *E);
// Base case. I'm supposed to ignore this.
- Sema::OwningExprResult VisitStmt(Stmt *) {
+ Sema::OwningExprResult VisitStmt(Stmt *S) {
+ S->dump();
assert(false && "Cannot instantiate this kind of expression");
return SemaRef.ExprError();
}
@@ -600,10 +601,7 @@ namespace {
Sema::OwningExprResult
TemplateExprInstantiator::VisitIntegerLiteral(IntegerLiteral *E) {
- // FIXME: Can't we just re-use the expression node?
- return SemaRef.Owned(new (SemaRef.Context) IntegerLiteral(E->getValue(),
- E->getType(),
- E->getLocation()));
+ return SemaRef.Clone(E);
}
Sema::OwningExprResult
OpenPOWER on IntegriCloud