From 5e6ee5503bcfdf47327a019e7ff172a378939d31 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 14 Mar 2022 22:10:39 +0100 Subject: Check that loplugin:trivialdestructor doesn't warn about deleted dtors ...which happens to be covered by if (!destructorDecl->hasTrivialBody()) return false; Change-Id: Ica2874e710da08d668b7e773373a1188a8ae16a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131575 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- compilerplugins/clang/test/trivialdestructor.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compilerplugins') diff --git a/compilerplugins/clang/test/trivialdestructor.cxx b/compilerplugins/clang/test/trivialdestructor.cxx index 16168cb5f927..98bf8262f29e 100644 --- a/compilerplugins/clang/test/trivialdestructor.cxx +++ b/compilerplugins/clang/test/trivialdestructor.cxx @@ -25,4 +25,9 @@ struct S2 // expected-error@+1 {{no need for explicit destructor decl [loplugin:trivialdestructor]}} S2::~S2() = default; +struct S3 +{ + ~S3() = delete; +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ -- cgit