]> granicus.if.org Git - clang/commitdiff
bool is not an extension in C++
authorDouglas Gregor <dgregor@apple.com>
Thu, 11 Sep 2008 12:06:59 +0000 (12:06 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 11 Sep 2008 12:06:59 +0000 (12:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56103 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/IdentifierTable.cpp

index 65e984a0f78d1735bb0698f13992576fa888b7b1..e650993bd04b1fcb5db802c5aa4b38d73f00d043 100644 (file)
@@ -70,7 +70,7 @@ static void AddKeyword(const char *Keyword, unsigned KWLen,
                        const LangOptions &LangOpts, IdentifierTable &Table) {
   int Flags = 0;
   if (BoolSupport != 0) {
-    Flags = LangOpts.Boolean ? BoolSupport : 2;
+    Flags = LangOpts.CPlusPlus? 0 : LangOpts.Boolean ? BoolSupport : 2;
   } else if (LangOpts.CPlusPlus) {
     Flags = LangOpts.CPlusPlus0x ? CXX0x : CXX;
   } else if (LangOpts.C99) {