diff options
author | Chris Lattner <sabre@nondot.org> | 2009-01-06 06:59:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-01-06 06:59:53 +0000 |
commit | 7a0ab5f387722c83e19c7133b46b16988eb19e45 (patch) | |
tree | c5a806f006cff70ff734a77011ef5dfeac0619ca /lib/Parse/ParseExprCXX.cpp | |
parent | 2f27477a29b6f5365ee545c1cac666cc8b95f518 (diff) |
rename MaybeParseCXXScopeSpecifier -> ParseOptionalCXXScopeSpecifier and
MaybeParseTypeSpecifier -> ParseOptionalTypeSpecifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61796 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExprCXX.cpp')
-rw-r--r-- | lib/Parse/ParseExprCXX.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp index f73bbca47c..88ca915714 100644 --- a/lib/Parse/ParseExprCXX.cpp +++ b/lib/Parse/ParseExprCXX.cpp @@ -17,10 +17,10 @@ #include "AstGuard.h" using namespace clang; -/// MaybeParseCXXScopeSpecifier - Parse global scope or nested-name-specifier. -/// Returns true if a nested-name-specifier was parsed from the token stream. -/// -/// Note that this routine will not parse ::new or ::delete. +/// ParseOptionalCXXScopeSpecifier - Parse global scope or +/// nested-name-specifier if present. Returns true if a nested-name-specifier +/// was parsed from the token stream. Note that this routine will not parse +/// ::new or ::delete, it will just leave them in the token stream. /// /// '::'[opt] nested-name-specifier /// '::' @@ -31,7 +31,7 @@ using namespace clang; /// nested-name-specifier identifier '::' /// nested-name-specifier 'template'[opt] simple-template-id '::' [TODO] /// -bool Parser::MaybeParseCXXScopeSpecifier(CXXScopeSpec &SS) { +bool Parser::ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS) { assert(getLang().CPlusPlus && "Call sites of this function should be guarded by checking for C++"); @@ -137,7 +137,7 @@ Parser::OwningExprResult Parser::ParseCXXIdExpression() { // '::' unqualified-id // CXXScopeSpec SS; - MaybeParseCXXScopeSpecifier(SS); + ParseOptionalCXXScopeSpecifier(SS); // unqualified-id: // identifier @@ -521,11 +521,12 @@ bool Parser::ParseCXXTypeSpecifierSeq(DeclSpec &DS) { int isInvalid = 0; // Parse one or more of the type specifiers. - if (!MaybeParseTypeSpecifier(DS, isInvalid, PrevSpec)) { + if (!ParseOptionalTypeSpecifier(DS, isInvalid, PrevSpec)) { Diag(Tok, diag::err_operator_missing_type_specifier); return true; } - while (MaybeParseTypeSpecifier(DS, isInvalid, PrevSpec)) ; + + while (ParseOptionalTypeSpecifier(DS, isInvalid, PrevSpec)); return false; } |