diff options
Diffstat (limited to 'lib/Parse/ParseStmt.cpp')
-rw-r--r-- | lib/Parse/ParseStmt.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp index fa8eb12044be..30e392fa3c94 100644 --- a/lib/Parse/ParseStmt.cpp +++ b/lib/Parse/ParseStmt.cpp @@ -12,18 +12,15 @@ // //===----------------------------------------------------------------------===// -#include "clang/Parse/Parser.h" #include "RAIIObjectsForParser.h" -#include "clang/AST/ASTContext.h" #include "clang/Basic/Attributes.h" -#include "clang/Basic/Diagnostic.h" #include "clang/Basic/PrettyStackTrace.h" +#include "clang/Parse/Parser.h" #include "clang/Sema/DeclSpec.h" #include "clang/Sema/LoopHint.h" #include "clang/Sema/PrettyDeclStackTrace.h" #include "clang/Sema/Scope.h" #include "clang/Sema/TypoCorrection.h" -#include "llvm/ADT/SmallString.h" using namespace clang; //===----------------------------------------------------------------------===// @@ -209,7 +206,8 @@ Retry: } default: { - if ((getLangOpts().CPlusPlus || Allowed == ACK_Any) && + if ((getLangOpts().CPlusPlus || getLangOpts().MicrosoftExt || + Allowed == ACK_Any) && isDeclarationStatement()) { SourceLocation DeclStart = Tok.getLocation(), DeclEnd; DeclGroupPtrTy Decl = ParseDeclaration(Declarator::BlockContext, @@ -398,6 +396,8 @@ StmtResult Parser::ParseExprStatement() { // If a case keyword is missing, this is where it should be inserted. Token OldToken = Tok; + ExprStatementTokLoc = Tok.getLocation(); + // expression[opt] ';' ExprResult Expr(ParseExpression()); if (Expr.isInvalid()) { |