diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-01-04 23:23:14 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-01-04 23:23:14 +0000 |
| commit | 9a8968b50d8eb0d1c74fed0ba90f5e8fc174d3de (patch) | |
| tree | 3b86ccc8bf169b1b08d8dc9eeb71aedb09f6defc /clang/lib/Parse/Parser.cpp | |
| parent | 7c53a18a08d9ade0e3d8b011f71b955957ab5672 (diff) | |
| download | bcm5719-llvm-9a8968b50d8eb0d1c74fed0ba90f5e8fc174d3de.tar.gz bcm5719-llvm-9a8968b50d8eb0d1c74fed0ba90f5e8fc174d3de.zip | |
my previous patch caused sema to drop the global qualifier, make
sure to pass it down. This makes the code a bit gross, I will clean
it up in subsequent commits.
llvm-svn: 61650
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
| -rw-r--r-- | clang/lib/Parse/Parser.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index 381c84e3178..29843b16689 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -741,14 +741,16 @@ Parser::OwningExprResult Parser::ParseSimpleAsm() { /// will not be called twice, once to check whether we have a declaration /// specifier, and another one to get the actual type inside /// ParseDeclarationSpecifiers). -void Parser::TryAnnotateTypeOrScopeToken() { +/// +/// This returns true if the token was annotated. +bool Parser::TryAnnotateTypeOrScopeToken(const Token *GlobalQualifier) { // FIXME: what about template-ids? if (Tok.is(tok::annot_qualtypename) || Tok.is(tok::annot_cxxscope)) - return; + return false; CXXScopeSpec SS; if (getLang().CPlusPlus) - MaybeParseCXXScopeSpecifier(SS); + MaybeParseCXXScopeSpecifier(SS, GlobalQualifier); if (Tok.is(tok::identifier)) { DeclTy *Template = 0; @@ -772,7 +774,7 @@ void Parser::TryAnnotateTypeOrScopeToken() { // In case the tokens were cached, have Preprocessor replace // them with the annotation token. PP.AnnotateCachedTokens(Tok); - return; + return true; } } @@ -785,7 +787,7 @@ void Parser::TryAnnotateTypeOrScopeToken() { // names a type. if (SS.isEmpty()) - return; + return false; // A C++ scope specifier that isn't followed by a typename. // Push the current token back into the token stream (or revert it if it is @@ -801,6 +803,7 @@ void Parser::TryAnnotateTypeOrScopeToken() { // In case the tokens were cached, have Preprocessor replace them with the // annotation token. PP.AnnotateCachedTokens(Tok); + return true; } /// TryAnnotateScopeToken - Like TryAnnotateTypeOrScopeToken but only |

