aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r--lib/Sema/SemaLookup.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index 65e8659f5f..29b45df63b 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -484,6 +484,11 @@ static bool LookupBuiltin(Sema &S, LookupResult &R) {
if (S.getLangOptions().CPlusPlus &&
S.Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID))
return false;
+ // When not in Objective-C mode, there is no builtin 'id' type.
+ // We won't have pre-defined library functions which use this type.
+ if (!S.getLangOptions().ObjC1 &&
+ S.Context.BuiltinInfo.GetTypeString(BuiltinID)[0] == 'G')
+ return false;
NamedDecl *D = S.LazilyCreateBuiltin((IdentifierInfo *)II, BuiltinID,
S.TUScope, R.isForRedeclaration(),