diff options
Diffstat (limited to 'clang/lib/Parse/ParseStmt.cpp')
-rw-r--r-- | clang/lib/Parse/ParseStmt.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp index d0d462b66ce..50db966aedb 100644 --- a/clang/lib/Parse/ParseStmt.cpp +++ b/clang/lib/Parse/ParseStmt.cpp @@ -435,13 +435,13 @@ Parser::OwningStmtResult Parser::ParseCompoundStatementBody(bool isStmtExpr) { SourceLocation ExtLoc = ConsumeToken(); while (Tok.is(tok::kw___extension__)) ConsumeToken(); - - // __extension__ silences extension warnings in the subexpression. - ExtensionRAIIObject O(Diags); // Use RAII to do this. // If this is the start of a declaration, parse it as such. if (isDeclarationStatement()) { + // __extension__ silences extension warnings in the subdeclaration. // FIXME: Save the __extension__ on the decl as a node somehow? + ExtensionRAIIObject O(Diags); + SourceLocation DeclStart = Tok.getLocation(), DeclEnd; DeclGroupPtrTy Res = ParseDeclaration(Declarator::BlockContext,DeclEnd); R = Actions.ActOnDeclStmt(Res, DeclStart, DeclEnd); |