In Microsoft Mode, disable the C++11 strict integral conversion rules for enumerator that were introduced with r148439. Otherwise MSVC headers won't compile in C++ 11 mode.
llvm-svn: 148642
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 7fd1073..696e842 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -9559,7 +9559,8 @@
EltTy = Context.DependentTy;
else {
SourceLocation ExpLoc;
- if (getLangOptions().CPlusPlus0x && Enum->isFixed()) {
+ if (getLangOptions().CPlusPlus0x && Enum->isFixed() &&
+ !getLangOptions().MicrosoftMode) {
// C++11 [dcl.enum]p5: If the underlying type is fixed, [...] the
// constant-expression in the enumerator-definition shall be a converted
// constant expression of the underlying type.