summaryrefslogtreecommitdiffstats
path: root/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorFaisal Vali <faisalv@yahoo.com>2018-01-01 15:42:13 +0000
committerFaisal Vali <faisalv@yahoo.com>2018-01-01 15:42:13 +0000
commit9d3d610d0582353d28b16c1d3acbd20773a93ab7 (patch)
treeb4fc18c9d9401b9247eb41dc5c73d1bf0ff75052 /lib/Parse/ParseDecl.cpp
parent5f7f2c06ee10be2b2b9f53d61d12d06fb7be3ff6 (diff)
[NFC] Modernize enums TypeSpecifierWidth, TypeSpecifierSign & TypeSpecifierType into scoped enums with underlying types.
- Since these enums are used as bit-fields - for the bit-fields to be interpreted as unsigned, the underlying type must be specified as unsigned. Previous failed attempt - wherein I did not specify an underlying type - was the sum of: https://reviews.llvm.org/rC321614 https://reviews.llvm.org/rC321615 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321622 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r--lib/Parse/ParseDecl.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 127e18439b..37cb8e29ea 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -3139,7 +3139,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
// static const bool __is_signed;
//
// then treat __is_signed as an identifier rather than as a keyword.
- if (DS.getTypeSpecType() == TST_bool &&
+ if (DS.getTypeSpecType() == TypeSpecifierType::TST_bool &&
DS.getTypeQualifiers() == DeclSpec::TQ_const &&
DS.getStorageClassSpec() == DeclSpec::SCS_static)
TryKeywordIdentFallback(true);
@@ -3614,7 +3614,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
break;
#include "clang/Basic/OpenCLImageTypes.def"
case tok::kw___unknown_anytype:
- isInvalid = DS.SetTypeSpecType(TST_unknown_anytype, Loc,
+ isInvalid = DS.SetTypeSpecType(TypeSpecifierType::TST_unknown_anytype, Loc,
PrevSpec, DiagID, Policy);
break;
@@ -3888,7 +3888,7 @@ void Parser::ParseStructDeclaration(
/// [OBC] '@' 'defs' '(' class-name ')'
///
void Parser::ParseStructUnionBody(SourceLocation RecordLoc,
- unsigned TagType, Decl *TagDecl) {
+ TypeSpecifierType TagType, Decl *TagDecl) {
PrettyDeclStackTraceEntry CrashInfo(Actions, TagDecl, RecordLoc,
"parsing struct/union body");
assert(!getLangOpts().CPlusPlus && "C++ declarations not supported");
@@ -5527,7 +5527,7 @@ void Parser::ParseDirectDeclarator(Declarator &D) {
NextToken().is(tok::r_paren) &&
!D.hasGroupingParens() &&
!Actions.containsUnexpandedParameterPacks(D) &&
- D.getDeclSpec().getTypeSpecType() != TST_auto)) {
+ D.getDeclSpec().getTypeSpecType() != TypeSpecifierType::TST_auto)) {
SourceLocation EllipsisLoc = ConsumeToken();
if (isPtrOperatorToken(Tok.getKind(), getLangOpts(), D.getContext())) {
// The ellipsis was put in the wrong place. Recover, and explain to
@@ -6107,7 +6107,7 @@ void Parser::ParseFunctionDeclarator(Declarator &D,
LocalEndLoc = EndLoc;
if (getLangOpts().CPlusPlus11 && Tok.is(tok::arrow)) {
Diag(Tok, diag::warn_cxx98_compat_trailing_return_type);
- if (D.getDeclSpec().getTypeSpecType() == TST_auto)
+ if (D.getDeclSpec().getTypeSpecType() == TypeSpecifierType::TST_auto)
StartLoc = D.getDeclSpec().getTypeSpecTypeLoc();
LocalEndLoc = Tok.getLocation();
SourceRange Range;