summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 0d0f2f5b99..3e368a3b10 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -11268,22 +11268,6 @@ ExprResult
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));
}