summaryrefslogtreecommitdiffstats
path: root/clang/include/clang/Parse
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include/clang/Parse')
-rw-r--r--clang/include/clang/Parse/ParseAST.h2
-rw-r--r--clang/include/clang/Parse/Parser.h20
-rw-r--r--clang/include/clang/Parse/RAIIObjectsForParser.h50
3 files changed, 36 insertions, 36 deletions
diff --git a/clang/include/clang/Parse/ParseAST.h b/clang/include/clang/Parse/ParseAST.h
index 34b04060346..f6e78ac2ca5 100644
--- a/clang/include/clang/Parse/ParseAST.h
+++ b/clang/include/clang/Parse/ParseAST.h
@@ -42,7 +42,7 @@ namespace clang {
CodeCompleteConsumer *CompletionConsumer = nullptr,
bool SkipFunctionBodies = false);
- /// Parse the main file known to the preprocessor, producing an
+ /// Parse the main file known to the preprocessor, producing an
/// abstract syntax tree.
void ParseAST(Sema &S, bool PrintStats = false,
bool SkipFunctionBodies = false);
diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h
index 41ccabf3808..69bf88a371d 100644
--- a/clang/include/clang/Parse/Parser.h
+++ b/clang/include/clang/Parse/Parser.h
@@ -132,7 +132,7 @@ class Parser : public CodeCompletionHandler {
/// Identifier for "unavailable".
IdentifierInfo *Ident_unavailable;
-
+
/// Identifier for "message".
IdentifierInfo *Ident_message;
@@ -1196,7 +1196,7 @@ private:
/// method will be stored so that they can be reintroduced into
/// scope at the appropriate times.
SmallVector<LateParsedDefaultArgument, 8> DefaultArgs;
-
+
/// The set of tokens that make up an exception-specification that
/// has not yet been parsed.
CachedTokens *ExceptionSpecTokens;
@@ -1225,7 +1225,7 @@ private:
/// C++ class, its method declarations that contain parts that won't be
/// parsed until after the definition is completed (C++ [class.mem]p2),
/// the method declarations and possibly attached inline definitions
- /// will be stored here with the tokens that will be parsed to create those
+ /// will be stored here with the tokens that will be parsed to create those
/// entities.
typedef SmallVector<LateParsedDeclaration*,2> LateParsedDeclarationsContainer;
@@ -1674,7 +1674,7 @@ private:
ExprResult ParseStringLiteralExpression(bool AllowUserDefinedLiteral = false);
ExprResult ParseGenericSelectionExpression();
-
+
ExprResult ParseObjCBoolLiteral();
ExprResult ParseFoldExpression(ExprResult LHS, BalancedDelimiterTracker &T);
@@ -1836,7 +1836,7 @@ private:
SourceLocation LBracloc, SourceLocation SuperLoc,
ParsedType ReceiverType, Expr *ReceiverExpr);
bool ParseObjCXXMessageReceiver(bool &IsExpr, void *&TypeOrExpr);
-
+
//===--------------------------------------------------------------------===//
// C99 6.8: Statements and Blocks.
@@ -2065,7 +2065,7 @@ private:
bool ParseImplicitInt(DeclSpec &DS, CXXScopeSpec *SS,
const ParsedTemplateInfo &TemplateInfo,
- AccessSpecifier AS, DeclSpecContext DSC,
+ AccessSpecifier AS, DeclSpecContext DSC,
ParsedAttributesWithRange &Attrs);
DeclSpecContext
getDeclSpecContextFromDeclaratorContext(DeclaratorContext Context);
@@ -2193,7 +2193,7 @@ private:
/// isCXXFunctionDeclarator - Disambiguates between a function declarator or
/// a constructor-style initializer, when parsing declaration statements.
/// Returns true for function declarator and false for constructor-style
- /// initializer. Sets 'IsAmbiguous' to true to indicate that this declaration
+ /// initializer. Sets 'IsAmbiguous' to true to indicate that this declaration
/// might be a constructor-style initializer.
/// If during the disambiguation process a parsing error is encountered,
/// the function returns true to let the declaration parsing code handle it.
@@ -2320,7 +2320,7 @@ private:
void stripTypeAttributesOffDeclSpec(ParsedAttributesWithRange &Attrs,
DeclSpec &DS, Sema::TagUseKind TUK);
-
+
// FixItLoc = possible correct location for the attributes
void ProhibitAttributes(ParsedAttributesWithRange &Attrs,
SourceLocation FixItLoc = SourceLocation()) {
@@ -2690,7 +2690,7 @@ private:
void ParseClassSpecifier(tok::TokenKind TagTokKind, SourceLocation TagLoc,
DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo,
AccessSpecifier AS, bool EnteringContext,
- DeclSpecContext DSC,
+ DeclSpecContext DSC,
ParsedAttributesWithRange &Attributes);
void SkipCXXMemberSpecification(SourceLocation StartLoc,
SourceLocation AttrFixitLoc,
@@ -2944,7 +2944,7 @@ private:
//===--------------------------------------------------------------------===//
// C++11/G++: Type Traits [Type-Traits.html in the GCC manual]
ExprResult ParseTypeTrait();
-
+
//===--------------------------------------------------------------------===//
// Embarcadero: Arary and Expression Traits
ExprResult ParseArrayTypeTrait();
diff --git a/clang/include/clang/Parse/RAIIObjectsForParser.h b/clang/include/clang/Parse/RAIIObjectsForParser.h
index f45d6434833..ba5e5fe3c8f 100644
--- a/clang/include/clang/Parse/RAIIObjectsForParser.h
+++ b/clang/include/clang/Parse/RAIIObjectsForParser.h
@@ -49,7 +49,7 @@ namespace clang {
bool Active;
public:
- /// Begin suppressing access-like checks
+ /// Begin suppressing access-like checks
SuppressAccessChecks(Parser &P, bool activate = true)
: S(P.getActions()), DiagnosticPool(nullptr) {
if (activate) {
@@ -264,7 +264,7 @@ namespace clang {
Diags.DecrementAllExtensionsSilenced();
}
};
-
+
/// ColonProtectionRAIIObject - This sets the Parser::ColonIsSacred bool and
/// restores it when destroyed. This says that "foo:" should not be
/// considered a possible typo for "foo::" for error recovery purposes.
@@ -276,18 +276,18 @@ namespace clang {
: P(p), OldVal(P.ColonIsSacred) {
P.ColonIsSacred = Value;
}
-
+
/// restore - This can be used to restore the state early, before the dtor
/// is run.
void restore() {
P.ColonIsSacred = OldVal;
}
-
+
~ColonProtectionRAIIObject() {
restore();
}
};
-
+
/// RAII object that makes '>' behave either as an operator
/// or as the closing angle bracket for a template argument list.
class GreaterThanIsOperatorScope {
@@ -298,28 +298,28 @@ namespace clang {
: GreaterThanIsOperator(GTIO), OldGreaterThanIsOperator(GTIO) {
GreaterThanIsOperator = Val;
}
-
+
~GreaterThanIsOperatorScope() {
GreaterThanIsOperator = OldGreaterThanIsOperator;
}
};
-
+
class InMessageExpressionRAIIObject {
bool &InMessageExpression;
bool OldValue;
-
+
public:
InMessageExpressionRAIIObject(Parser &P, bool Value)
- : InMessageExpression(P.InMessageExpression),
+ : InMessageExpression(P.InMessageExpression),
OldValue(P.InMessageExpression) {
InMessageExpression = Value;
}
-
+
~InMessageExpressionRAIIObject() {
InMessageExpression = OldValue;
}
};
-
+
/// RAII object that makes sure paren/bracket/brace count is correct
/// after declaration/statement parsing, even when there's a parsing error.
class ParenBraceBracketBalancer {
@@ -329,7 +329,7 @@ namespace clang {
ParenBraceBracketBalancer(Parser &p)
: P(p), ParenCount(p.ParenCount), BracketCount(p.BracketCount),
BraceCount(p.BraceCount) { }
-
+
~ParenBraceBracketBalancer() {
P.AngleBrackets.clear(P);
P.ParenCount = ParenCount;
@@ -369,7 +369,7 @@ namespace clang {
tok::TokenKind Kind, Close, FinalToken;
SourceLocation (Parser::*Consumer)();
SourceLocation LOpen, LClose;
-
+
unsigned short &getDepth() {
switch (Kind) {
case tok::l_brace: return P.BraceCount;
@@ -378,10 +378,10 @@ namespace clang {
default: llvm_unreachable("Wrong token kind");
}
}
-
+
bool diagnoseOverflow();
bool diagnoseMissingClose();
-
+
public:
BalancedDelimiterTracker(Parser& p, tok::TokenKind k,
tok::TokenKind FinalToken = tok::semi)
@@ -391,34 +391,34 @@ namespace clang {
switch (Kind) {
default: llvm_unreachable("Unexpected balanced token");
case tok::l_brace:
- Close = tok::r_brace;
+ Close = tok::r_brace;
Consumer = &Parser::ConsumeBrace;
break;
case tok::l_paren:
- Close = tok::r_paren;
+ Close = tok::r_paren;
Consumer = &Parser::ConsumeParen;
break;
-
+
case tok::l_square:
- Close = tok::r_square;
+ Close = tok::r_square;
Consumer = &Parser::ConsumeBracket;
break;
- }
+ }
}
-
+
SourceLocation getOpenLocation() const { return LOpen; }
SourceLocation getCloseLocation() const { return LClose; }
SourceRange getRange() const { return SourceRange(LOpen, LClose); }
-
+
bool consumeOpen() {
if (!P.Tok.is(Kind))
return true;
-
+
if (getDepth() < P.getLangOpts().BracketDepth) {
LOpen = (P.*Consumer)();
return false;
}
-
+
return diagnoseOverflow();
}
@@ -436,7 +436,7 @@ namespace clang {
LClose = (P.*Consumer)();
return false;
}
-
+
return diagnoseMissingClose();
}
void skipToEnd();
OpenPOWER on IntegriCloud