diff options
author | Steve Naroff <snaroff@apple.com> | 2009-02-12 17:52:19 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-02-12 17:52:19 +0000 |
commit | 389bf46ae41241a656ed71b00ac2177d7f385651 (patch) | |
tree | daeeca9857ded6eeed23fa266b3a2f3262095874 /lib/Sema/SemaOverload.cpp | |
parent | 17f194f4393a67fd28ad822c06d32b8cb99bad3f (diff) |
Several cleanups:
- rename isObjCIdType/isObjCClassType -> isObjCIdStructType/isObjCClassStructType. The previous name didn't do what you would expect.
- add back isObjCIdType/isObjCClassType to do what you would expect. Not currently used, however many of the isObjCIdStructType/isObjCClassStructType clients could be converted over time.
- move static Sema function areComparableObjCInterfaces to ASTContext (renamed to areComparableObjCPointerTypes, since it now operates on pointer types).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64385 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index c96fec70bb..049aca51ce 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -1019,8 +1019,8 @@ bool Sema::isObjCPointerConversion(QualType FromType, QualType ToType, // Objective C++: We're able to convert between "id" and a pointer // to any interface (in both directions). - if ((FromIface && Context.isObjCIdType(ToPointeeType)) - || (ToIface && Context.isObjCIdType(FromPointeeType))) { + if ((FromIface && Context.isObjCIdStructType(ToPointeeType)) + || (ToIface && Context.isObjCIdStructType(FromPointeeType))) { ConvertedType = BuildSimilarlyQualifiedPointerType(FromTypePtr, ToPointeeType, ToType, Context); @@ -1029,10 +1029,10 @@ bool Sema::isObjCPointerConversion(QualType FromType, QualType ToType, // Objective C++: Allow conversions between the Objective-C "id" and // "Class", in either direction. - if ((Context.isObjCIdType(FromPointeeType) && - Context.isObjCClassType(ToPointeeType)) || - (Context.isObjCClassType(FromPointeeType) && - Context.isObjCIdType(ToPointeeType))) { + if ((Context.isObjCIdStructType(FromPointeeType) && + Context.isObjCClassStructType(ToPointeeType)) || + (Context.isObjCClassStructType(FromPointeeType) && + Context.isObjCIdStructType(ToPointeeType))) { ConvertedType = ToType; return true; } @@ -1131,10 +1131,10 @@ bool Sema::CheckPointerConversion(Expr *From, QualType ToType) { // Objective-C++ conversions are always okay. // FIXME: We should have a different class of conversions for // the Objective-C++ implicit conversions. - if (Context.isObjCIdType(FromPointeeType) || - Context.isObjCIdType(ToPointeeType) || - Context.isObjCClassType(FromPointeeType) || - Context.isObjCClassType(ToPointeeType)) + if (Context.isObjCIdStructType(FromPointeeType) || + Context.isObjCIdStructType(ToPointeeType) || + Context.isObjCClassStructType(FromPointeeType) || + Context.isObjCClassStructType(ToPointeeType)) return false; if (FromPointeeType->isRecordType() && |