diff options
| author | Alex Lorenz <arphaman@gmail.com> | 2017-03-23 10:46:05 +0000 |
|---|---|---|
| committer | Alex Lorenz <arphaman@gmail.com> | 2017-03-23 10:46:05 +0000 |
| commit | 5ffe4e14f1e3476776663840af9b551caf6466c3 (patch) | |
| tree | ceb5360086e499181b8cf0b5b4016d809abb7c7b /clang/lib/Sema | |
| parent | 85436ece8954bbcc8760d05932f602914e501810 (diff) | |
| download | bcm5719-llvm-5ffe4e14f1e3476776663840af9b551caf6466c3.tar.gz bcm5719-llvm-5ffe4e14f1e3476776663840af9b551caf6466c3.zip | |
[ObjC][ARC] Avoid -Warc-performSelector-leaks for performSelector variations
that became supported after r297019
The commit r297019 expanded the performSelector ObjC method family heuristic
to ensure that -Wobjc-unsafe-perform-selector covers all performSelector
variations. However, this made the -Warc-performSelector-leaks too noisy, as
that warning produces mostly false positives since the selector is unknown.
This commit reverts the ObjC method family heuristics introduced in r297019.
This ensures that -Warc-performSelector-leaks isn't too noisy. The commit still
preserves the coverage of -Wobjc-unsafe-perform-selector.
rdar://31124629
llvm-svn: 298587
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaExprObjC.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp index 661fd81e9ce..fba0653854f 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/lib/Sema/SemaExprObjC.cpp @@ -2272,7 +2272,8 @@ static void checkFoundationAPI(Sema &S, SourceLocation Loc, bool IsClassObjectCall) { // Check if this is a performSelector method that uses a selector that returns // a record or a vector type. - if (Method->getMethodFamily() != OMF_performSelector || Args.empty()) + if (Method->getSelector().getMethodFamily() != OMF_performSelector || + Args.empty()) return; const auto *SE = dyn_cast<ObjCSelectorExpr>(Args[0]->IgnoreParens()); if (!SE) |

