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 | b76051534ce32aca680c51ea43e2d67cba2e2851 (patch) | |
tree | 80ebd09557964d40ad456c14f78bf34360dfd189 /clang/lib/Sema/SemaOverload.cpp | |
parent | 844deb73f4b773c919a7a2f8e8ce5c45052aa5e4 (diff) | |
download | bcm5719-llvm-b76051534ce32aca680c51ea43e2d67cba2e2851.tar.gz bcm5719-llvm-b76051534ce32aca680c51ea43e2d67cba2e2851.zip |
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).
llvm-svn: 64385
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index c96fec70bbb..049aca51ce0 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/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() && |