summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/dbgunhandledexception.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-16 14:35:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-17 08:18:00 +0200
commitff55ad1aceb10b900254c8ad3629775b7789d60a (patch)
treeb40fa0a185f0110967b2ffcf2e5038a4341a7a00 /compilerplugins/clang/dbgunhandledexception.cxx
parent47a774fbef8c224e4853de3fdd0230b9442bb716 (diff)
simplify sharedplugin PostTraverse calls
(*) nobody is using the bool parameter, so drop it (*) nobody is using the "return false to permanently disable the plugin", and that is a dangerous footgun, so drop it Change-Id: I75c1fbd022ffb8aba7237568ce048031bbc31a5d Reviewed-on: https://gerrit.libreoffice.org/75726 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins/clang/dbgunhandledexception.cxx')
-rw-r--r--compilerplugins/clang/dbgunhandledexception.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/compilerplugins/clang/dbgunhandledexception.cxx b/compilerplugins/clang/dbgunhandledexception.cxx
index 81d6126fb3af..0b0cb41edc2e 100644
--- a/compilerplugins/clang/dbgunhandledexception.cxx
+++ b/compilerplugins/clang/dbgunhandledexception.cxx
@@ -34,7 +34,7 @@ public:
bool VisitCallExpr(CallExpr const* call);
bool TraverseCXXCatchStmt(CXXCatchStmt*);
bool PreTraverseCXXCatchStmt(CXXCatchStmt*);
- bool PostTraverseCXXCatchStmt(CXXCatchStmt*, bool traverseOk);
+ void PostTraverseCXXCatchStmt(CXXCatchStmt*);
private:
std::stack<CXXCatchStmt const*> currCatchStmt;
@@ -56,11 +56,10 @@ bool DbgUnhandledException::PreTraverseCXXCatchStmt(CXXCatchStmt* catchStmt)
return true;
}
-bool DbgUnhandledException::PostTraverseCXXCatchStmt(CXXCatchStmt* catchStmt, bool)
+void DbgUnhandledException::PostTraverseCXXCatchStmt(CXXCatchStmt* catchStmt)
{
assert(currCatchStmt.top() == catchStmt);
currCatchStmt.pop();
- return true;
}
bool DbgUnhandledException::TraverseCXXCatchStmt(CXXCatchStmt* catchStmt)
@@ -68,8 +67,7 @@ bool DbgUnhandledException::TraverseCXXCatchStmt(CXXCatchStmt* catchStmt)
if (!PreTraverseCXXCatchStmt(catchStmt))
return false;
bool ret = RecursiveASTVisitor::TraverseCXXCatchStmt(catchStmt);
- if (!PostTraverseCXXCatchStmt(catchStmt, ret))
- return false;
+ PostTraverseCXXCatchStmt(catchStmt);
return ret;
}