summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-18 10:39:48 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-01-18 12:50:09 +0000
commita7f6efc68ba97db98ebab9ebc473bffb8ded757f (patch)
treebad37ce9ee1c9f61f1c8541a9689ecdea8c84c08 /compilerplugins
parenta08745551370a052bfb6b91335956ababf435791 (diff)
loplugin: unused return values
Change-Id: I9c61a46c57894bc63a57740206c0bcb4a16553af Reviewed-on: https://gerrit.libreoffice.org/21571 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/unusedmethods.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/compilerplugins/clang/unusedmethods.cxx b/compilerplugins/clang/unusedmethods.cxx
index c74bfed1f191..6f724f8b0e36 100644
--- a/compilerplugins/clang/unusedmethods.cxx
+++ b/compilerplugins/clang/unusedmethods.cxx
@@ -237,6 +237,8 @@ gotfunc:
}
const Stmt* parent = parentStmt(expr);
if (!parent) {
+ // we will get null parent if it's under a CXXConstructExpr node
+ logCallToRootMethods(calleeFunctionDecl, usedReturnSet);
return true;
}
if (isa<Expr>(parent) || isa<ReturnStmt>(parent) || isa<DeclStmt>(parent)