From 7a895ec4205659038aa95941b65715fed1a3e7be Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 5 May 2024 17:09:24 +0200 Subject: [PATCH] Avoid loplugin:noexceptmove failure with recent Clang 19 trunk > CallExpr 0x7fae572c85e0 '' > `-UnresolvedMemberExpr 0x7fae572c8580 '' lvalue > `-DeclRefExpr 0x7fae572c8560 'WeakReference' lvalue ParmVar 0x7fae572c76d0 'rWeakRef' 'WeakReference &&' > In file included from tools/source/ref/ref.cxx:21: > include/tools/weakbase.hxx:52:5: error: what's up doc? [loplugin:noexceptmove] > 52 | rWeakRef.reset(); > | ^~~~~~~~~~~~~~~~ Change-Id: I5693fda3c4e5afb02e6229bcb8ea952a62f0e363 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167157 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- compilerplugins/clang/noexceptmove.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compilerplugins/clang/noexceptmove.cxx b/compilerplugins/clang/noexceptmove.cxx index 04ec58044ce4..9be55e870e61 100644 --- a/compilerplugins/clang/noexceptmove.cxx +++ b/compilerplugins/clang/noexceptmove.cxx @@ -286,7 +286,8 @@ compat::optional NoExceptMove::IsCallThrows(const CallExpr* callExpr) } auto calleeExpr = callExpr->getCallee(); - if (isa(calleeExpr) || isa(calleeExpr)) + if (isa(calleeExpr) || isa(calleeExpr) + || isa(calleeExpr)) { m_CannotFix.back() = true; return true;