diff options
author | Francois Pichet <pichet2000@gmail.com> | 2012-01-21 23:26:50 +0000 |
---|---|---|
committer | Francois Pichet <pichet2000@gmail.com> | 2012-01-21 23:26:50 +0000 |
commit | 6b6fb4fe64684df35975fbe299d5085d70c5c178 (patch) | |
tree | 0fe006ce2a78508bb1a791582e7f4e712a20238b /lib/Sema/SemaDecl.cpp | |
parent | 31ceb61172bca7ebc3fb90e9125864c7a29c55c0 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 7fd10735b7..696e84234c 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -9559,7 +9559,8 @@ EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum, 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. |