summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseTentative.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2018-07-30 19:24:48 +0000
committerFangrui Song <maskray@google.com>2018-07-30 19:24:48 +0000
commit6907ce2f8f7410b179beb6e2db9c8d16a257ce9f (patch)
tree31081ac1b3df5965102999757410e052925e03af /clang/lib/Parse/ParseTentative.cpp
parentce9b3e084c43e99fbcfeb730ddb5fd0e575d5237 (diff)
downloadbcm5719-llvm-6907ce2f8f7410b179beb6e2db9c8d16a257ce9f.tar.gz
bcm5719-llvm-6907ce2f8f7410b179beb6e2db9c8d16a257ce9f.zip
Remove trailing space
sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h} llvm-svn: 338291
Diffstat (limited to 'clang/lib/Parse/ParseTentative.cpp')
-rw-r--r--clang/lib/Parse/ParseTentative.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp
index 0603d8e75ee..dfd1f8c3b2e 100644
--- a/clang/lib/Parse/ParseTentative.cpp
+++ b/clang/lib/Parse/ParseTentative.cpp
@@ -80,10 +80,10 @@ bool Parser::isCXXDeclarationStatement() {
/// (if AllowForRangeDecl specified)
/// for ( for-range-declaration : for-range-initializer ) statement
///
-/// for-range-declaration:
+/// for-range-declaration:
/// decl-specifier-seq declarator
/// decl-specifier-seq ref-qualifier[opt] '[' identifier-list ']'
-///
+///
/// In any of the above cases there can be a preceding attribute-specifier-seq,
/// but the caller is expected to handle that.
bool Parser::isCXXSimpleDeclaration(bool AllowForRangeDecl) {
@@ -132,7 +132,7 @@ bool Parser::isCXXSimpleDeclaration(bool AllowForRangeDecl) {
// Ok, we have a simple-type-specifier/typename-specifier followed by a '(',
// or an identifier which doesn't resolve as anything. We need tentative
// parsing...
-
+
{
RevertingTentativeParsingAction PA(*this);
TPR = TryParseSimpleDeclaration(AllowForRangeDecl);
@@ -236,7 +236,7 @@ Parser::TPResult Parser::TryConsumeDeclarationSpecifier() {
///
/// (if AllowForRangeDecl specified)
/// for ( for-range-declaration : for-range-initializer ) statement
-/// for-range-declaration:
+/// for-range-declaration:
/// attribute-specifier-seqopt type-specifier-seq declarator
///
Parser::TPResult Parser::TryParseSimpleDeclaration(bool AllowForRangeDecl) {
@@ -964,7 +964,7 @@ Parser::TPResult Parser::TryParseDeclarator(bool mayBeAbstract,
return TPResult::Ambiguous;
}
-Parser::TPResult
+Parser::TPResult
Parser::isExpressionOrTypeSpecifierSimple(tok::TokenKind Kind) {
switch (Kind) {
// Obviously starts an expression.
@@ -1026,7 +1026,7 @@ Parser::isExpressionOrTypeSpecifierSimple(tok::TokenKind Kind) {
case tok::kw_##Spelling:
#include "clang/Basic/TokenKinds.def"
return TPResult::True;
-
+
// Obviously starts a type-specifier-seq:
case tok::kw_char:
case tok::kw_const:
@@ -1084,7 +1084,7 @@ Parser::isExpressionOrTypeSpecifierSimple(tok::TokenKind Kind) {
default:
break;
}
-
+
return TPResult::Ambiguous;
}
@@ -1338,7 +1338,7 @@ Parser::isCXXDeclarationSpecifier(Parser::TPResult BracedCastResult,
// Debugger support
case tok::kw___unknown_anytype:
-
+
// type-specifier:
// simple-type-specifier
// class-specifier
@@ -1395,7 +1395,7 @@ Parser::isCXXDeclarationSpecifier(Parser::TPResult BracedCastResult,
// Borland
case tok::kw___pascal:
return TPResult::True;
-
+
// AltiVec
case tok::kw___vector:
return TPResult::True;
@@ -1510,24 +1510,24 @@ Parser::isCXXDeclarationSpecifier(Parser::TPResult BracedCastResult,
// Tentatively parse the protocol qualifiers.
RevertingTentativeParsingAction PA(*this);
ConsumeAnyToken(); // The type token
-
+
TPResult TPR = TryParseProtocolQualifiers();
bool isFollowedByParen = Tok.is(tok::l_paren);
bool isFollowedByBrace = Tok.is(tok::l_brace);
-
+
if (TPR == TPResult::Error)
return TPResult::Error;
-
+
if (isFollowedByParen)
return TPResult::Ambiguous;
if (getLangOpts().CPlusPlus11 && isFollowedByBrace)
return BracedCastResult;
-
+
return TPResult::True;
}
LLVM_FALLTHROUGH;
-
+
case tok::kw_char:
case tok::kw_wchar_t:
case tok::kw_char8_t:
@@ -1562,7 +1562,7 @@ Parser::isCXXDeclarationSpecifier(Parser::TPResult BracedCastResult,
if (isStartOfObjCClassMessageMissingOpenBracket())
return TPResult::False;
-
+
return TPResult::True;
// GNU typeof support.
@@ -1681,18 +1681,18 @@ Parser::TPResult Parser::TryParseProtocolQualifiers() {
if (Tok.isNot(tok::identifier))
return TPResult::Error;
ConsumeToken();
-
+
if (Tok.is(tok::comma)) {
ConsumeToken();
continue;
}
-
+
if (Tok.is(tok::greater)) {
ConsumeToken();
return TPResult::Ambiguous;
}
} while (false);
-
+
return TPResult::Error;
}
@@ -1910,7 +1910,7 @@ Parser::TPResult Parser::TryParseFunctionDeclarator() {
// ref-qualifier[opt]
if (Tok.isOneOf(tok::amp, tok::ampamp))
ConsumeToken();
-
+
// exception-specification
if (Tok.is(tok::kw_throw)) {
ConsumeToken();
OpenPOWER on IntegriCloud