diff --git a/compilerplugins/clang/unusedmethods.cxx b/compilerplugins/clang/unusedmethods.cxx index 5b10eae7e9df..db001f17620c 100644 --- a/compilerplugins/clang/unusedmethods.cxx +++ b/compilerplugins/clang/unusedmethods.cxx @@ -285,6 +285,8 @@ gotfunc: logCallToRootMethods(calleeFunctionDecl, usedReturnSet); return true; } + if (auto attributedStmt = dyn_cast(parent)) + parent = attributedStmt->getSubStmt(); if (isa(parent) || isa(parent) || isa(parent) || isa(parent) || isa(parent) || isa(parent) || isa(parent) || isa(parent) @@ -298,6 +300,10 @@ gotfunc: { return true; } + report( + DiagnosticsEngine::Warning, + "unknown parent?", + parent->getBeginLoc()); parent->dump(); return true; }