diff options
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 70dd5e2..39ba93e 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -3471,8 +3471,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, // typedef-name case tok::kw___super: case tok::kw_decltype: - case tok::identifier: - ParseIdentifier: { + case tok::identifier: { // This identifier can only be a typedef name if we haven't already seen // a type-specifier. Without this check we misparse: // typedef int X; struct Y { short X; }; as 'short int'. @@ -3665,7 +3664,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, } } ConsumedEnd = Tok.getLocation(); - DS.setTypeArgumentRange(Tracker.getRange()); + DS.setTypeofParensRange(Tracker.getRange()); // Even if something went wrong above, continue as if we've seen // `decltype(auto)`. isInvalid = DS.SetTypeSpecType(TST_decltype_auto, Loc, PrevSpec, @@ -4207,13 +4206,8 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, HandlePragmaMSPointersToMembers(); continue; -#define TRANSFORM_TYPE_TRAIT_DEF(_, Trait) case tok::kw___##Trait: -#include "clang/Basic/TransformTypeTraits.def" - // HACK: libstdc++ already uses '__remove_cv' as an alias template so we - // work around this by expecting all transform type traits to be suffixed - // with '('. They're an identifier otherwise. - if (!MaybeParseTypeTransformTypeSpecifier(DS)) - goto ParseIdentifier; + case tok::kw___underlying_type: + ParseUnderlyingTypeSpecifier(DS); continue; case tok::kw__Atomic: @@ -7451,7 +7445,7 @@ void Parser::ParseTypeofSpecifier(DeclSpec &DS) { ExprResult Operand = Actions.CorrectDelayedTyposInExpr( ParseExprAfterUnaryExprOrTypeTrait(OpTok, isCastExpr, CastTy, CastRange)); if (hasParens) - DS.setTypeArgumentRange(CastRange); + DS.setTypeofParensRange(CastRange); if (CastRange.getEnd().isInvalid()) // FIXME: Not accurate, the range gets one token more than it should. @@ -7521,7 +7515,7 @@ void Parser::ParseAtomicSpecifier(DeclSpec &DS) { if (T.getCloseLocation().isInvalid()) return; - DS.setTypeArgumentRange(T.getRange()); + DS.setTypeofParensRange(T.getRange()); DS.SetRangeEnd(T.getCloseLocation()); const char *PrevSpec = nullptr; |