summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseTemplate.cpp
diff options
context:
space:
mode:
authorFaisal Vali <faisalv@yahoo.com>2015-11-19 19:20:17 +0000
committerFaisal Vali <faisalv@yahoo.com>2015-11-19 19:20:17 +0000
commit48401eb18aabafd50ea8a24d254b3cc74a7b1363 (patch)
tree0085b1cc5d62e1005371d9a411d6e28e781ef0a7 /clang/lib/Parse/ParseTemplate.cpp
parent7aac24805bdcb5e2d1c47d09a92e43da89eabcfb (diff)
downloadbcm5719-llvm-48401eb18aabafd50ea8a24d254b3cc74a7b1363.tar.gz
bcm5719-llvm-48401eb18aabafd50ea8a24d254b3cc74a7b1363.zip
Change the expression evaluation context from Unevaluated to ConstantEvaluated while substituting into non-type template argument defaults.
Also address a typo from a prior patch that performed a similar fix during Parsing of default non-type template arguments. I left the RAII ExpressionEvaluationContext variable Name as Unevaluated though we had switched the context to ConstantEvaluated. There should be no functionality change here - since when expression evaluation context is popped off, for the most part these two contexts currently behave similarly in regards to lambda diagnostics and odr-use tracking. Like its parsing counterpart, this patch presages the advent of constexpr lambda patches... llvm-svn: 253590
Diffstat (limited to 'clang/lib/Parse/ParseTemplate.cpp')
-rw-r--r--clang/lib/Parse/ParseTemplate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseTemplate.cpp b/clang/lib/Parse/ParseTemplate.cpp
index d661ce023a8..4fcd8b346c7 100644
--- a/clang/lib/Parse/ParseTemplate.cpp
+++ b/clang/lib/Parse/ParseTemplate.cpp
@@ -695,8 +695,8 @@ Parser::ParseNonTypeTemplateParameter(unsigned Depth, unsigned Position) {
// end of the template-parameter-list rather than a greater-than
// operator.
GreaterThanIsOperatorScope G(GreaterThanIsOperator, false);
- EnterExpressionEvaluationContext Unevaluated(Actions,
- Sema::ConstantEvaluated);
+ EnterExpressionEvaluationContext ConstantEvaluated(Actions,
+ Sema::ConstantEvaluated);
DefaultArg = Actions.CorrectDelayedTyposInExpr(ParseAssignmentExpression());
if (DefaultArg.isInvalid())
OpenPOWER on IntegriCloud