File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
lib/StaticAnalyzer/Checkers/WebKit
test/Analysis/Checkers/WebKit Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -266,10 +266,11 @@ class ForwardDeclChecker : public Checker<check::ASTDecl<TranslationUnitDecl>> {
266266 while (ArgExpr) {
267267 ArgExpr = ArgExpr->IgnoreParenCasts ();
268268 if (auto *InnerCE = dyn_cast<CallExpr>(ArgExpr)) {
269- auto *InnerCallee = InnerCE->getDirectCallee ();
270- if (isStdOrWTFMove (InnerCallee) && InnerCE->getNumArgs () == 1 ) {
271- ArgExpr = InnerCE->getArg (0 );
272- continue ;
269+ if (auto *InnerCallee = InnerCE->getDirectCallee ()) {
270+ if (isStdOrWTFMove (InnerCallee) && InnerCE->getNumArgs () == 1 ) {
271+ ArgExpr = InnerCE->getArg (0 );
272+ continue ;
273+ }
273274 }
274275 }
275276 if (auto *UO = dyn_cast<UnaryOperator>(ArgExpr)) {
Original file line number Diff line number Diff line change @@ -71,6 +71,10 @@ void rval(Obj&& arg) {
7171 return objcobj;
7272}
7373
74+ void obj_ptr_null_callee (ObjCObj* (*cb)()) {
75+ receive_objcobj (cb ());
76+ }
77+
7478struct WrapperObj {
7579 Obj* ptr { nullptr };
7680 // expected-warning@-1{{Member variable 'ptr' uses a forward declared type 'Obj *'}}
You can’t perform that action at this time.
0 commit comments