diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-04 20:29:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-05 08:27:43 +0200 |
commit | 9dac199094a71a9f0d806c39a6a990b31f5e0f4c (patch) | |
tree | a1b048121343be52bbf8d9fca270479a58f50c4c /compilerplugins | |
parent | 6c9917c7a74e1c14f1c60ad40b96470b6ef08936 (diff) |
loplugin:noexceptmove improve feedback
Change-Id: I16612abd535812bdb9d46aa9886b1e02747aab6f
Reviewed-on: https://gerrit.libreoffice.org/78614
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/noexceptmove.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/compilerplugins/clang/noexceptmove.cxx b/compilerplugins/clang/noexceptmove.cxx index 1920d11ac571..1a1f2de41971 100644 --- a/compilerplugins/clang/noexceptmove.cxx +++ b/compilerplugins/clang/noexceptmove.cxx @@ -206,6 +206,13 @@ bool NoExceptMove::VisitCXXConstructExpr(const CXXConstructExpr* constructExpr) ; // ok, non-throwing else if (IsCallThrowsSpec(est)) { + if (bLookForStuffWeCanFix) + { + if (est == EST_None && !ignoreLocation(constructorDecl)) + m_Exclusions.back().push_back(constructorDecl); + else + m_CannotFix.back() = true; + } m_ConstructorThrows.back() = true; } return true; @@ -232,6 +239,13 @@ bool NoExceptMove::VisitVarDecl(const VarDecl* varDecl) ; // ok, non-throwing else if (IsCallThrowsSpec(est)) { + if (bLookForStuffWeCanFix) + { + if (est == EST_None && !ignoreLocation(destructorDecl)) + m_Exclusions.back().push_back(destructorDecl); + else + m_CannotFix.back() = true; + } m_ConstructorThrows.back() = true; } return true; |