summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseExprCXX.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-06 06:59:53 +0000
committerChris Lattner <sabre@nondot.org>2009-01-06 06:59:53 +0000
commita448d75b2a5743b9c0343e34d07dcdc5cff1cdb2 (patch)
tree70103a9b5f9788839015259ba6a8959909551188 /clang/lib/Parse/ParseExprCXX.cpp
parent9b01ca1f5a6a413d4e31504ee1684dbb61727612 (diff)
downloadbcm5719-llvm-a448d75b2a5743b9c0343e34d07dcdc5cff1cdb2.tar.gz
bcm5719-llvm-a448d75b2a5743b9c0343e34d07dcdc5cff1cdb2.zip
rename MaybeParseCXXScopeSpecifier -> ParseOptionalCXXScopeSpecifier and
MaybeParseTypeSpecifier -> ParseOptionalTypeSpecifier. llvm-svn: 61796
Diffstat (limited to 'clang/lib/Parse/ParseExprCXX.cpp')
-rw-r--r--clang/lib/Parse/ParseExprCXX.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/clang/lib/Parse/ParseExprCXX.cpp b/clang/lib/Parse/ParseExprCXX.cpp
index f73bbca47c9..88ca9157145 100644
--- a/clang/lib/Parse/ParseExprCXX.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud