aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorAxel Naumann <Axel.Naumann@cern.ch>2011-04-13 13:19:46 +0000
committerAxel Naumann <Axel.Naumann@cern.ch>2011-04-13 13:19:46 +0000
commit42151d5ba957841a15ffda0fac71cd7cb653d45e (patch)
tree12a83433b4cddfecf71218917403c1fb31184278 /lib/Sema/SemaLookup.cpp
parentbae20d00c68bf337191cbcbbda705f9492f83b29 (diff)
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
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r--lib/Sema/SemaLookup.cpp4
1 files 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.