diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-09-08 20:08:18 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-09-08 20:08:18 +0000 |
commit | d1877953f06df6df9b2cd5fc04b49e80eec66019 (patch) | |
tree | ebf2aeca8dc7940c9b947ee27dd1102ba834ac66 /lib/Sema/SemaType.cpp | |
parent | 6b5415196327fa8ef00f028ba175fafef1738ae1 (diff) |
Fix a crash when overloading id with objc_object*.
Radar 8400356.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113397 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index aa30b5c2da..06d8b3d4f6 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -1274,8 +1274,12 @@ TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D, Scope *S, if (BTy->getKind() == BuiltinType::Float) ArgTy = Context.DoubleTy; } + } else if (getLangOptions().ObjC1) { + if (ArgTy->isLegacyObjCIdType(Context)) + ArgTy = Context.getObjCIdType(); + else if (ArgTy->isLegacyObjCClassType(Context)) + ArgTy = Context.getObjCClassType(); } - ArgTys.push_back(ArgTy); } |