diff options
author | Faisal Vali <faisalv@yahoo.com> | 2017-04-01 21:30:49 +0000 |
---|---|---|
committer | Faisal Vali <faisalv@yahoo.com> | 2017-04-01 21:30:49 +0000 |
commit | d143a0c2de1311575633de3c6a3f55b101889229 (patch) | |
tree | c2e69d0ca1363f458b6be56e8b478b8e45f3e8de /clang/lib/Sema/Sema.cpp | |
parent | 1a3665bb828c28781ade8252a40d6d5a682fcd66 (diff) | |
download | bcm5719-llvm-d143a0c2de1311575633de3c6a3f55b101889229.tar.gz bcm5719-llvm-d143a0c2de1311575633de3c6a3f55b101889229.zip |
[NFC, Scoped Enum] Convert Sema::ExpressionEvaluationContext into a scoped Enum
- also replace direct equality checks against the ConstantEvaluated enumerator with isConstantEvaluted(), in anticipation of adding finer granularity to the various ConstantEvaluated contexts and reinstating certain restrictions on where lambda expressions can occur in C++17.
- update the clang tablegen backend that uses these Enumerators, and add the relevant scope where needed.
llvm-svn: 299316
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r-- | clang/lib/Sema/Sema.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 057e43f211a..294b56059b3 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -122,8 +122,9 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer, // Tell diagnostics how to render things from the AST library. Diags.SetArgToStringFn(&FormatASTNodeDiagnosticArgument, &Context); - ExprEvalContexts.emplace_back(PotentiallyEvaluated, 0, CleanupInfo{}, nullptr, - false); + ExprEvalContexts.emplace_back( + ExpressionEvaluationContext::PotentiallyEvaluated, 0, CleanupInfo{}, + nullptr, false); FunctionScopes.push_back(new FunctionScopeInfo(Diags)); |