case OMF_performSelector:
if (Method && NumArgs >= 1) {
- if (ObjCSelectorExpr *SelExp = dyn_cast<ObjCSelectorExpr>(Args[0])) {
+ if (const auto *SelExp =
+ dyn_cast<ObjCSelectorExpr>(Args[0]->IgnoreParens())) {
Selector ArgSel = SelExp->getSelector();
ObjCMethodDecl *SelMethod =
LookupInstanceMethodInGlobalPool(ArgSel,
return [self performSelector : @selector(init)];
return [self performSelector : sel1]; // expected-warning {{performSelector may cause a leak because its selector is unknown}} \
// expected-note {{used here}}
+ return [self performSelector: (@selector(PlusZero))];
return [self performSelector : @selector(PlusZero)];
return [self performSelector : @selector(PlusOne)]; // expected-error {{performSelector names a selector which retains the object}}