From dfd110ce5e64077ec94df195233e7a39895bf15e Mon Sep 17 00:00:00 2001 From: Francois Pichet Date: Sun, 22 Jul 2012 11:32:41 +0000 Subject: 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 --- lib/Basic/IdentifierTable.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/Basic/IdentifierTable.cpp') 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; -- cgit v1.2.3