ObjC kindof: check the context when inserting methods to global pool.
authorManman Ren <manman.ren@gmail.com>
Sat, 9 Apr 2016 18:59:48 +0000 (18:59 +0000)
committerManman Ren <manman.ren@gmail.com>
Sat, 9 Apr 2016 18:59:48 +0000 (18:59 +0000)
commit71224530c10ae7349c008237ec5c284fd1451c62
treee2fa9c7c478eff5de579075759a7d1698488aa0c
parent3891e9e859e76dec82f88a9ed902fe7e016147cd
ObjC kindof: check the context when inserting methods to global pool.

To make kindof lookup work, we need to insert methods with different
context into the global pool, even though they have the same siganture.

Since diagnosis of availability is performed on the best candidate,
which is often the first candidate from the global pool, we prioritize
the methods that are unavaible or deprecated to the head of the list.

Since we now have more methods in the global pool, we need to watch
out for performance impact.

rdar://25635831

llvm-svn: 265877
clang/include/clang/Sema/ObjCMethodList.h
clang/lib/Sema/SemaDeclObjC.cpp
clang/test/FixIt/typo.m
clang/test/SemaObjC/kindof.m
clang/test/SemaObjC/multiple-method-names.m
clang/test/SemaObjC/warn-strict-selector-match.m