diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-04-16 21:03:30 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-04-16 21:03:30 +0000 |
commit | 93a49944e0e68e32bc22d45d44ee136b34beffb3 (patch) | |
tree | c03ad6c71583f9869e45e4e76e091da2cacbf9e3 /lib/Sema/SemaExpr.cpp | |
parent | 9482a185d34d8b0f6d788c44e2c128991622c0ad (diff) |
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
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 18 |
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)); } |