diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-03-14 22:10:39 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-03-15 13:40:28 +0100 |
commit | 5e6ee5503bcfdf47327a019e7ff172a378939d31 (patch) | |
tree | 3d197a0012351cf47912d7ec019f3c3b0f8a3b86 /compilerplugins | |
parent | c3346dc5731ecadb4762b939b76056eaed193341 (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')
-rw-r--r-- | compilerplugins/clang/test/trivialdestructor.cxx | 5 |
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: */ |