summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/noexceptmove.cxx14
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;