diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-10-16 16:21:20 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-10-16 16:21:20 +0000 |
commit | 9f5933a73b2dde9164f4fed001d987491f277c9a (patch) | |
tree | d963d21e83d83d3f7d2d44b5711dc8b6f59a6196 | |
parent | 891dac73bdb090ff845982e4334f5b4c18353dbe (diff) |
fixes an objc crash involving objc bool literal on
hopelessly poorly written code after spewing several
errors. // rdar://12491143
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166025 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 3d66baa925..02eac1190b 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -11917,7 +11917,7 @@ Sema::ActOnObjCBoolLiteral(SourceLocation OpLoc, tok::TokenKind Kind) { 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); |