aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-31 18:51:41 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-31 18:51:41 +0000
commit395cc3728047b999cafe2a640147a20f1a8d4696 (patch)
tree64e22a418a9b2911f89eeeebdf7241b169c9ded8 /lib/Frontend/CompilerInstance.cpp
parent9641fc8e43f53b1ae8ed7742017e0a320d75fa8a (diff)
Implement reasonable conversion ranking for Objective-C pointer
conversions (<rdar://problem/8592139>) for overload resolution. The conversion ranking mirrors C++'s conversion ranking fairly closely, except that we use a same pseudo-subtyping relationship employed by Objective-C pointer assignment rather than simple checking derived-to-base conversions. This change covers: - Conversions to pointers to a specific object type are better than conversions to 'id', 'Class', qualified 'id', or qualified 'Class' (note: GCC doesn't perform this ranking, but it matches C++'s rules for ranking conversions to void*). - Conversions to qualified 'id' or qualified 'Class' are better than conversions to 'id' or 'Class', respectively. - When two conversion sequences convert to the same type, rank the conversions based on the relationship between the types we're converting from. - When two conversion sequences convert from the same non-id, non-Class type, rank the conversions based on the relationship of the types we're converting to. (note: GCC allows this ranking even when converting from 'id', which is extremeley dangerous). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124591 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
0 files changed, 0 insertions, 0 deletions