aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorThorsten <schuett@gmail.com>2020-11-16 14:08:33 -0500
committerAaron Ballman <aaron@aaronballman.com>2020-11-16 14:10:19 -0500
commit41b65f166b51760f77d0f9e465b3858f46e101f0 (patch)
treeb6ce24e1571e09b9d6d02d27ca864a87fd407e8a /clang/lib/Parse/ParseDecl.cpp
parentee91e2311cf5209c39c46cd99de0fe686b7b5716 (diff)
downloadllvm-41b65f166b51760f77d0f9e465b3858f46e101f0.zip
llvm-41b65f166b51760f77d0f9e465b3858f46e101f0.tar.gz
llvm-41b65f166b51760f77d0f9e465b3858f46e101f0.tar.bz2
Convert ConstexprKind from Specifiers.h to a scoped enum; NFC
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 79392f6..277a67f 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -2438,7 +2438,7 @@ void Parser::ParseSpecifierQualifierList(DeclSpec &DS, AccessSpecifier AS,
// Issue diagnostic and remove constexpr specifier if present.
if (DS.hasConstexprSpecifier() && DSC != DeclSpecContext::DSC_condition) {
Diag(DS.getConstexprSpecLoc(), diag::err_typename_invalid_constexpr)
- << DS.getConstexprSpecifier();
+ << static_cast<int>(DS.getConstexprSpecifier());
DS.ClearConstexprSpec();
}
}
@@ -3679,13 +3679,16 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
// constexpr, consteval, constinit specifiers
case tok::kw_constexpr:
- isInvalid = DS.SetConstexprSpec(CSK_constexpr, Loc, PrevSpec, DiagID);
+ isInvalid = DS.SetConstexprSpec(ConstexprSpecKind::Constexpr, Loc,
+ PrevSpec, DiagID);
break;
case tok::kw_consteval:
- isInvalid = DS.SetConstexprSpec(CSK_consteval, Loc, PrevSpec, DiagID);
+ isInvalid = DS.SetConstexprSpec(ConstexprSpecKind::Consteval, Loc,
+ PrevSpec, DiagID);
break;
case tok::kw_constinit:
- isInvalid = DS.SetConstexprSpec(CSK_constinit, Loc, PrevSpec, DiagID);
+ isInvalid = DS.SetConstexprSpec(ConstexprSpecKind::Constinit, Loc,
+ PrevSpec, DiagID);
break;
// type-specifier