objective-c modern translator: buildit objc bool
type for rewriter project will be BoolTy.
// rdar://11231426. 


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154861 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 0d0f2f5..3e368a3 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -11268,22 +11268,6 @@
 Sema::ActOnObjCBoolLiteral(SourceLocation OpLoc, tok::TokenKind Kind) {
   assert((Kind == tok::kw___objc_yes || Kind == tok::kw___objc_no) &&
          "Unknown Objective-C Boolean value!");
-  QualType ObjCBoolLiteralQT = Context.ObjCBuiltinBoolTy;
-  // signed char is the default type for boolean literals. Use 'BOOL'
-  // instead, if BOOL typedef is visible in its scope instead.
-  Decl *TD = 
-    LookupSingleName(TUScope, &Context.Idents.get("BOOL"), 
-                     SourceLocation(), LookupOrdinaryName);
-  if (TypedefDecl *BoolTD = dyn_cast_or_null<TypedefDecl>(TD)) {
-    QualType QT = BoolTD->getUnderlyingType();
-    if (!QT->isIntegralOrUnscopedEnumerationType()) {
-      Diag(OpLoc, diag::warn_bool_for_boolean_literal) << QT;
-      Diag(BoolTD->getLocation(), diag::note_previous_declaration);
-    }
-    else
-      ObjCBoolLiteralQT = QT;
-  }
-  
   return Owned(new (Context) ObjCBoolLiteralExpr(Kind == tok::kw___objc_yes,
-                                        ObjCBoolLiteralQT, OpLoc));
+                                        Context.ObjCBuiltinBoolTy, OpLoc));
 }