aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/IdentifierTable.cpp
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2012-07-22 11:32:41 +0000
committerFrancois Pichet <pichet2000@gmail.com>2012-07-22 11:32:41 +0000
commitdfd110ce5e64077ec94df195233e7a39895bf15e (patch)
tree81ca0f4bd954109cc4529d293ff1d15856c7b7f5 /lib/Basic/IdentifierTable.cpp
parent8986e108e04a4fbe9248f87708410bb073940d7b (diff)
char16_t and char32_t are defined via typedef in MSVC 11 RC. So introduce a way to disable keywords under Microsoft mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160612 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/IdentifierTable.cpp')
-rw-r--r--lib/Basic/IdentifierTable.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp
index 6981455855..96d09a6bc1 100644
--- a/lib/Basic/IdentifierTable.cpp
+++ b/lib/Basic/IdentifierTable.cpp
@@ -103,7 +103,8 @@ namespace {
KEYOPENCL = 0x200,
KEYC11 = 0x400,
KEYARC = 0x800,
- KEYALL = 0x0fff
+ KEYALL = 0x0fff,
+ KEYNOMS = 0x1000
};
}
@@ -136,6 +137,9 @@ static void AddKeyword(StringRef Keyword,
else if (LangOpts.ObjC2 && (Flags & KEYARC)) AddResult = 2;
else if (LangOpts.CPlusPlus && (Flags & KEYCXX0X)) AddResult = 3;
+ // Don't add this keyword under MicrosoftMode.
+ if (LangOpts.MicrosoftMode && (Flags & KEYNOMS))
+ return;
// Don't add this keyword if disabled in this language.
if (AddResult == 0) return;