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>
This commit is contained in:
@@ -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() {}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user