]> granicus.if.org Git - clang/commitdiff
From Vassil Vassilev: Give external source's last resort lookup a chance, even if...
authorAxel Naumann <Axel.Naumann@cern.ch>
Wed, 13 Apr 2011 13:19:46 +0000 (13:19 +0000)
committerAxel Naumann <Axel.Naumann@cern.ch>
Wed, 13 Apr 2011 13:19:46 +0000 (13:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129438 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaLookup.cpp

index 2fd799ba41ce679a4c8a3be7574fc0a2d6ff0df7..fe94224a6e6c5989571231d2135ec687919f1022 100644 (file)
@@ -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.