forked from OSchip/llvm-project
parent
17cf1130ed
commit
67055f5ddc
|
@ -896,7 +896,7 @@ bool Parser::ParseParenExprOrCondition(ExprResult &ExprResult,
|
|||
|
||||
// Otherwise the condition is valid or the rparen is present.
|
||||
T.consumeClose();
|
||||
|
||||
|
||||
// Check for extraneous ')'s to catch things like "if (foo())) {". We know
|
||||
// that all callers are looking for a statement after the condition, so ")"
|
||||
// isn't valid.
|
||||
|
@ -905,7 +905,7 @@ bool Parser::ParseParenExprOrCondition(ExprResult &ExprResult,
|
|||
<< FixItHint::CreateRemoval(Tok.getLocation());
|
||||
ConsumeParen();
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1259,7 +1259,7 @@ StmtResult Parser::ParseDoStatement() {
|
|||
// Parse the parenthesized condition.
|
||||
BalancedDelimiterTracker T(*this, tok::l_paren);
|
||||
T.consumeOpen();
|
||||
|
||||
|
||||
// FIXME: Do not just parse the attribute contents and throw them away
|
||||
ParsedAttributesWithRange attrs(AttrFactory);
|
||||
MaybeParseCXX0XAttributes(attrs);
|
||||
|
@ -1305,7 +1305,8 @@ StmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) {
|
|||
return StmtError();
|
||||
}
|
||||
|
||||
bool C99orCXXorObjC = getLangOpts().C99 || getLangOpts().CPlusPlus || getLangOpts().ObjC1;
|
||||
bool C99orCXXorObjC = getLangOpts().C99 || getLangOpts().CPlusPlus ||
|
||||
getLangOpts().ObjC1;
|
||||
|
||||
// C99 6.8.5p5 - In C99, the for statement is a block. This is not
|
||||
// the case for C90. Start the loop scope.
|
||||
|
@ -1492,7 +1493,7 @@ StmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) {
|
|||
// of an auto-typed loop variable.
|
||||
StmtResult ForRangeStmt;
|
||||
StmtResult ForEachStmt;
|
||||
|
||||
|
||||
if (ForRange) {
|
||||
ForRangeStmt = Actions.ActOnCXXForRangeStmt(ForLoc, T.getOpenLocation(),
|
||||
FirstPart.take(),
|
||||
|
@ -1506,7 +1507,7 @@ StmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) {
|
|||
} else if (ForEach) {
|
||||
ForEachStmt = Actions.ActOnObjCForCollectionStmt(ForLoc, T.getOpenLocation(),
|
||||
FirstPart.take(),
|
||||
Collection.take(),
|
||||
Collection.take(),
|
||||
T.getCloseLocation());
|
||||
}
|
||||
|
||||
|
@ -1638,7 +1639,7 @@ StmtResult Parser::ParseReturnStatement() {
|
|||
}
|
||||
|
||||
// needSpaceAsmToken - This function handles whitespace around asm punctuation.
|
||||
// Returns true if a space should be emitted.
|
||||
// Returns true if a space should be emitted.
|
||||
static inline bool needSpaceAsmToken(Token currTok) {
|
||||
static Token prevTok;
|
||||
|
||||
|
@ -1802,7 +1803,7 @@ StmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) {
|
|||
for (unsigned i = 0, e = AsmToks.size(); i < e; ++i) {
|
||||
const char *ThisTokBuf = &TokenBuf[0];
|
||||
bool StringInvalid = false;
|
||||
unsigned ThisTokLen =
|
||||
unsigned ThisTokLen =
|
||||
Lexer::getSpelling(AsmToks[i], ThisTokBuf, PP.getSourceManager(),
|
||||
PP.getLangOpts(), &StringInvalid);
|
||||
if (i && (!AsmLineNum || i != LineEnds[AsmLineNum-1]) &&
|
||||
|
@ -1846,7 +1847,8 @@ StmtResult Parser::ParseAsmStatement(bool &msAsm) {
|
|||
assert(Tok.is(tok::kw_asm) && "Not an asm stmt");
|
||||
SourceLocation AsmLoc = ConsumeToken();
|
||||
|
||||
if (getLangOpts().MicrosoftExt && Tok.isNot(tok::l_paren) && !isTypeQualifier()) {
|
||||
if (getLangOpts().MicrosoftExt && Tok.isNot(tok::l_paren) &&
|
||||
!isTypeQualifier()) {
|
||||
msAsm = true;
|
||||
return ParseMicrosoftAsmStatement(AsmLoc);
|
||||
}
|
||||
|
@ -2149,7 +2151,7 @@ StmtResult Parser::ParseCXXTryBlockCommon(SourceLocation TryLoc) {
|
|||
return move(TryBlock);
|
||||
|
||||
// Borland allows SEH-handlers with 'try'
|
||||
|
||||
|
||||
if ((Tok.is(tok::identifier) &&
|
||||
Tok.getIdentifierInfo() == getSEHExceptKeyword()) ||
|
||||
Tok.is(tok::kw___finally)) {
|
||||
|
@ -2189,7 +2191,7 @@ StmtResult Parser::ParseCXXTryBlockCommon(SourceLocation TryLoc) {
|
|||
if (Handlers.empty())
|
||||
return StmtError();
|
||||
|
||||
return Actions.ActOnCXXTryBlock(TryLoc, TryBlock.take(), move_arg(Handlers));
|
||||
return Actions.ActOnCXXTryBlock(TryLoc, TryBlock.take(),move_arg(Handlers));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2285,10 +2287,10 @@ void Parser::ParseMicrosoftIfExistsStatement(StmtVector &Stmts) {
|
|||
case IEB_Parse:
|
||||
// Parse the statements below.
|
||||
break;
|
||||
|
||||
|
||||
case IEB_Dependent:
|
||||
llvm_unreachable("Dependent case handled above");
|
||||
|
||||
|
||||
case IEB_Skip:
|
||||
Braces.skipToEnd();
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue