[Parse] Let declarations follow labels in -fms-extensions mode
MSVC permits declarations in these places as conforming extension (it is
a constraint violation otherwise).
This fixes PR28782.
llvm-svn: 277352
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp
index 9043ebb..d0557b8 100644
--- a/clang/lib/Parse/ParseStmt.cpp
+++ b/clang/lib/Parse/ParseStmt.cpp
@@ -206,7 +206,8 @@
}
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,