summaryrefslogtreecommitdiff
path: root/compilerplugins/clang
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-03-24 08:02:36 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-03-24 09:28:15 +0100
commit5ace52e6aef6f602ce8bf367b45ab2b740a85cd6 (patch)
treea98425ae592cd95a926e2400427a93bcda26c895 /compilerplugins/clang
parentd501a1c00cc6c7a98269465324620c44dd50f3e4 (diff)
Adapt loplugin:trivialconsructor to clang-cl
...where the S4 template constructor may still have an unparsed null body, so if (!constructorDecl->hasTrivialBody()) return true; will suppress the expected warning. Lets just accept that clang-cl on Windows will find less instances of loplugin:trivialconstructor. (And moving the expected-error comment around on the line was demanded by clang-format. Oh my.) Change-Id: I3357fbd0fbf932f7f93c421c2f079a8cfc536eef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132019 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r--compilerplugins/clang/test/trivialconstructor.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/compilerplugins/clang/test/trivialconstructor.cxx b/compilerplugins/clang/test/trivialconstructor.cxx
index 5b48c4cf4250..eed26f8bf305 100644
--- a/compilerplugins/clang/test/trivialconstructor.cxx
+++ b/compilerplugins/clang/test/trivialconstructor.cxx
@@ -27,7 +27,9 @@ struct S3
template <typename> struct S4
{
- // expected-error@+1 {{no need for explicit constructor decl [loplugin:trivialconstructor]}}
+#if !defined _MSC_VER
+// expected-error@+2 {{no need for explicit constructor decl [loplugin:trivialconstructor]}}
+#endif
S4() {}
};