summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2012-01-21 23:26:50 +0000
committerFrancois Pichet <pichet2000@gmail.com>2012-01-21 23:26:50 +0000
commit2056a69cb285d09d91e4f168c40aeb45b80b5027 (patch)
treece654ed0ba7b399fd47d8b36458ba241fd7ea893 /clang/lib/Sema/SemaDecl.cpp
parentdcaa5fbd08ed496fb7ce5532c5cfc8aae035815c (diff)
downloadbcm5719-llvm-2056a69cb285d09d91e4f168c40aeb45b80b5027.tar.gz
bcm5719-llvm-2056a69cb285d09d91e4f168c40aeb45b80b5027.zip
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
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 7fd10735b7a..696e84234cd 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud