diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-02-29 04:03:55 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-02-29 04:03:55 +0000 |
commit | 72b8b1ef9f7fb4f66fefcbd8d82fce2301b851d4 (patch) | |
tree | 4b46247b7ac7b97810ce8ad5d7e01d03679c46e6 /lib/Sema/SemaExpr.cpp | |
parent | 5840dd9a09c458ef894e7d47caab1d90dc4c1112 (diff) |
A couple minor bug-fixes for template instantiation for expressions which are sometimes potentially evaluated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151707 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 5a2b2dc7e9..56debcf208 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -9308,6 +9308,8 @@ namespace { } ExprResult Sema::TranformToPotentiallyEvaluated(Expr *E) { + assert(ExprEvalContexts.back().Context == Unevaluated && + "Should only transform unevaluated expressions"); ExprEvalContexts.back().Context = ExprEvalContexts[ExprEvalContexts.size()-2].Context; if (ExprEvalContexts.back().Context == Unevaluated) |