diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2015-04-15 17:26:21 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2015-04-15 17:26:21 +0000 |
commit | 890803f5f4c049ab42165a582dedfd8dc53cce33 (patch) | |
tree | e8136b12e47b199f99139d042e9358236404d38a /clang/lib/Sema/SemaExpr.cpp | |
parent | 7fa23fc78fdb0e56b83eab2c0f780d2bbe443c1d (diff) | |
download | bcm5719-llvm-890803f5f4c049ab42165a582dedfd8dc53cce33.tar.gz bcm5719-llvm-890803f5f4c049ab42165a582dedfd8dc53cce33.zip |
[Objective-C Sema]This patch fixes the warning when clang issues
"multiple methods named '<selector>' found" warning by noting
the method that is actualy used. It also cleans up and refactors
code in this area and selects a method that matches actual arguments
in case of receiver being a forward class object.
rdar://19265430
llvm-svn: 235023
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index e095ee71582..d18aeab57a0 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -8175,8 +8175,7 @@ static bool hasIsEqualMethod(Sema &S, const Expr *LHS, const Expr *RHS) { if (Type->isObjCIdType()) { // For 'id', just check the global pool. Method = S.LookupInstanceMethodInGlobalPool(IsEqualSel, SourceRange(), - /*receiverId=*/true, - /*warn=*/false); + /*receiverId=*/true); } else { // Check protocols. Method = S.LookupMethodInQualifiedType(IsEqualSel, Type, |