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 | 379e5363f63c9357470817024186bb3d3e2ecb81 (patch) | |
tree | 63c0af56cf785463b9072d5c1e9f935d879ba552 /clang/lib/Sema/SemaExpr.cpp | |
parent | 610a86e6bf374dba8fff12cf439f97fcb74006b8 (diff) | |
download | bcm5719-llvm-379e5363f63c9357470817024186bb3d3e2ecb81.tar.gz bcm5719-llvm-379e5363f63c9357470817024186bb3d3e2ecb81.zip |
fixes an objc crash involving objc bool literal on
hopelessly poorly written code after spewing several
errors. // rdar://12491143
llvm-svn: 166025
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 3d66baa9259..02eac1190ba 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/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); |