ParseOptionalTypeSpecifier should consume a token if it returns true.
llvm-svn: 62704
This commit is contained in:
parent
d1760b7837
commit
78ecd4f61e
|
@ -511,9 +511,8 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
|
||||||
case tok::identifier: {
|
case tok::identifier: {
|
||||||
// In C++, check to see if this is a scope specifier like foo::bar::, if
|
// In C++, check to see if this is a scope specifier like foo::bar::, if
|
||||||
// so handle it as such. This is important for ctor parsing.
|
// so handle it as such. This is important for ctor parsing.
|
||||||
if (getLang().CPlusPlus &&
|
if (getLang().CPlusPlus && TryAnnotateCXXScopeToken())
|
||||||
TryAnnotateCXXScopeToken())
|
continue;
|
||||||
continue;
|
|
||||||
|
|
||||||
// This identifier can only be a typedef name if we haven't already seen
|
// This identifier can only be a typedef name if we haven't already seen
|
||||||
// a type-specifier. Without this check we misparse:
|
// a type-specifier. Without this check we misparse:
|
||||||
|
@ -842,7 +841,9 @@ bool Parser::ParseOptionalTypeSpecifier(DeclSpec &DS, int& isInvalid,
|
||||||
case tok::kw___cdecl:
|
case tok::kw___cdecl:
|
||||||
case tok::kw___stdcall:
|
case tok::kw___stdcall:
|
||||||
case tok::kw___fastcall:
|
case tok::kw___fastcall:
|
||||||
return PP.getLangOptions().Microsoft;
|
if (!PP.getLangOptions().Microsoft) return false;
|
||||||
|
ConsumeToken();
|
||||||
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// Not a type-specifier; do nothing.
|
// Not a type-specifier; do nothing.
|
||||||
|
|
Loading…
Reference in New Issue