summaryrefslogtreecommitdiff
path: root/compilerplugins/clang
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-03-14 22:10:39 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-03-15 13:40:28 +0100
commit5e6ee5503bcfdf47327a019e7ff172a378939d31 (patch)
tree3d197a0012351cf47912d7ec019f3c3b0f8a3b86 /compilerplugins/clang
parentc3346dc5731ecadb4762b939b76056eaed193341 (diff)
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 <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r--compilerplugins/clang/test/trivialdestructor.cxx5
1 files changed, 5 insertions, 0 deletions
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: */