aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-11-09 21:38:20 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-11-09 21:38:20 +0000
commitba8bda05fefd3bb2f1ef201784b685f715bdde29 (patch)
tree181f5d6965e2d819ba94be9cbe32ac3436f8b622 /lib/Sema
parent7ad5d421d9f12bd287aa17fdb00e0f4d5971d76f (diff)
Restore patch reversed in r118475. Fixes
// rdar://8632525 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118634 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/SemaLookup.cpp5
-rw-r--r--lib/Sema/builtin_objc_msgSend.c12
2 files changed, 17 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(),
diff --git a/lib/Sema/builtin_objc_msgSend.c b/lib/Sema/builtin_objc_msgSend.c
new file mode 100644
index 0000000000..357a5bc26e
--- /dev/null
+++ b/lib/Sema/builtin_objc_msgSend.c
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 %s -fsyntax-only -verify
+// rdar://8632525
+
+typedef struct objc_class *Class;
+typedef struct objc_object {
+ Class isa;
+} *id;
+
+
+typedef struct objc_selector *SEL;
+extern id objc_msgSend(id self, SEL op, ...);
+