Test case? From: Fariborz Jahanian Sent: 10/16/2012 9:24 AM To: [email protected] Subject: [cfe-commits] r166025 - /cfe/trunk/lib/Sema/SemaExpr.cpp Author: fjahanian Date: Tue Oct 16 11:21:20 2012 New Revision: 166025
URL: http://llvm.org/viewvc/llvm-project?rev=166025&view=rev Log: fixes an objc crash involving objc bool literal on hopelessly poorly written code after spewing several errors. // rdar://12491143 Modified: cfe/trunk/lib/Sema/SemaExpr.cpp Modified: cfe/trunk/lib/Sema/SemaExpr.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=166025&r1=166024&r2=166025&view=diff ============================================================================== --- cfe/trunk/lib/Sema/SemaExpr.cpp (original) +++ cfe/trunk/lib/Sema/SemaExpr.cpp Tue Oct 16 11:21:20 2012 @@ -11917,7 +11917,7 @@ if (!Context.getBOOLDecl()) { LookupResult Result(*this, &Context.Idents.get("BOOL"), SourceLocation(), Sema::LookupOrdinaryName); - if (LookupName(Result, getCurScope())) { + if (LookupName(Result, getCurScope()) && Result.isSingleResult()) { NamedDecl *ND = Result.getFoundDecl(); if (TypedefDecl *TD = dyn_cast<TypedefDecl>(ND)) Context.setBOOLDecl(TD); _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
