[cfe-commits] r62704 - /cfe/trunk/lib/Parse/ParseDecl.cpp
Chris Lattner
sabre at nondot.org
Wed Jan 21 11:19:27 PST 2009
Author: lattner
Date: Wed Jan 21 13:19:26 2009
New Revision: 62704
URL: http://llvm.org/viewvc/llvm-project?rev=62704&view=rev
Log:
ParseOptionalTypeSpecifier should consume a token if it returns true.
Modified:
cfe/trunk/lib/Parse/ParseDecl.cpp
Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=62704&r1=62703&r2=62704&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Wed Jan 21 13:19:26 2009
@@ -511,9 +511,8 @@
case tok::identifier: {
// 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.
- if (getLang().CPlusPlus &&
- TryAnnotateCXXScopeToken())
- continue;
+ if (getLang().CPlusPlus && TryAnnotateCXXScopeToken())
+ continue;
// This identifier can only be a typedef name if we haven't already seen
// a type-specifier. Without this check we misparse:
@@ -842,7 +841,9 @@
case tok::kw___cdecl:
case tok::kw___stdcall:
case tok::kw___fastcall:
- return PP.getLangOptions().Microsoft;
+ if (!PP.getLangOptions().Microsoft) return false;
+ ConsumeToken();
+ return true;
default:
// Not a type-specifier; do nothing.
More information about the cfe-commits
mailing list