Such function decls,as objc's objc_msgSend, builtins in
a specific language. We are adding such language info. by
extensing Builtins.def and via a language flag added
to LIBBUILTIN/BUILTIN and check for that when deciding
a name is builtin or not. Implements //rdar://8689273.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120429 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index 29b45df..b73177e 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -484,12 +484,7 @@
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(),
R.getNameLoc());