summaryrefslogtreecommitdiffstats
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
commit43dec14079ed43e9c25e574558381bc1742282e2 (patch)
treeb73ad227c2b1888b6ebbb60fe3fcc33fb67947d9
parentfdb9f6a3ca11f2ea75aa2674e9884fe9c3d96018 (diff)
downloadbcm5719-llvm-43dec14079ed43e9c25e574558381bc1742282e2.tar.gz
bcm5719-llvm-43dec14079ed43e9c25e574558381bc1742282e2.zip
From Vassil Vassilev: Give external source's last resort lookup a chance, even if an identifier could resolve to a builtin.
llvm-svn: 129438
-rw-r--r--clang/lib/Sema/SemaLookup.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index 2fd799ba41c..fe94224a6e6 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud