From 42151d5ba957841a15ffda0fac71cd7cb653d45e Mon Sep 17 00:00:00 2001 From: Axel Naumann Date: Wed, 13 Apr 2011 13:19:46 +0000 Subject: [PATCH] From Vassil Vassilev: Give external source's last resort lookup a chance, even if an identifier could resolve to a builtin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129438 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaLookup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index 2fd799ba41..fe94224a6e 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -1129,8 +1129,8 @@ bool Sema::LookupName(LookupResult &R, Scope *S, bool AllowBuiltinCreation) { // If we didn't find a use of this identifier, and if the identifier // corresponds to a compiler builtin, create the decl object for the builtin // now, injecting it into translation unit scope, and return it. - if (AllowBuiltinCreation) - return LookupBuiltin(*this, R); + if (AllowBuiltinCreation && LookupBuiltin(*this, R)) + return true; // If we didn't find a use of this identifier, the ExternalSource // may be able to handle the situation. -- 2.50.1