]> granicus.if.org Git - clang/commitdiff
Handle "bool" in all places that touch _Bool.
authorChris Lattner <sabre@nondot.org>
Thu, 15 Nov 2007 05:25:19 +0000 (05:25 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 15 Nov 2007 05:25:19 +0000 (05:25 +0000)
This fixes code like "if((bool)x) {}" for example.

Patch by Nate Begeman.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44159 91177308-0d34-0410-b5e6-96231b3b80d8

Parse/ParseDecl.cpp
Parse/ParseObjc.cpp

index 5feb40b0d9c2075cbfb5847ae4156e21ab3f9bc6..3c2eb2a84057f6ad636c88c26f1711c302321f50 100644 (file)
@@ -937,6 +937,7 @@ bool Parser::isTypeSpecifierQualifier() const {
   case tok::kw_int:
   case tok::kw_float:
   case tok::kw_double:
+  case tok::kw_bool:
   case tok::kw__Bool:
   case tok::kw__Decimal32:
   case tok::kw__Decimal64:
@@ -985,6 +986,7 @@ bool Parser::isDeclarationSpecifier() const {
   case tok::kw_int:
   case tok::kw_float:
   case tok::kw_double:
+  case tok::kw_bool:
   case tok::kw__Bool:
   case tok::kw__Decimal32:
   case tok::kw__Decimal64:
index 2152601094b2283ddf1f604e999a868113a51d8b..345906e70f1a0df32d35bbb455839e6d44033af7 100644 (file)
@@ -467,6 +467,7 @@ IdentifierInfo *Parser::ParseObjCSelector(SourceLocation &SelectorLoc) {
   case tok::kw_void:                        
   case tok::kw_volatile:                    
   case tok::kw_while:                       
+  case tok::kw_bool:
   case tok::kw__Bool:
   case tok::kw__Complex:
     IdentifierInfo *II = Tok.getIdentifierInfo();