diff options
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Basic/IdentifierTable.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp index 613b43fce95..db148f493f4 100644 --- a/clang/lib/Basic/IdentifierTable.cpp +++ b/clang/lib/Basic/IdentifierTable.cpp @@ -105,10 +105,10 @@ namespace { KEYOPENCL = 0x200, KEYC11 = 0x400, KEYARC = 0x800, - KEYNOMS = 0x01000, + KEYNOMS18 = 0x01000, WCHARSUPPORT = 0x02000, HALFSUPPORT = 0x04000, - KEYALL = (0xffff & ~KEYNOMS) // Because KEYNOMS is used to exclude. + KEYALL = (0xffff & ~KEYNOMS18) // Because KEYNOMS18 is used to exclude. }; /// \brief How a keyword is treated in the selected standard. @@ -154,7 +154,8 @@ static void AddKeyword(StringRef Keyword, KeywordStatus AddResult = getKeywordStatus(LangOpts, Flags); // Don't add this keyword under MSVCCompat. - if (LangOpts.MSVCCompat && (Flags & KEYNOMS)) + if (LangOpts.MSVCCompat && (Flags & KEYNOMS18) && + !LangOpts.isCompatibleWithMSVC(19)) return; // Don't add this keyword if disabled in this language. if (AddResult == KS_Disabled) return; |

