summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-03-02 00:11:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-03-02 07:10:19 +0000
commit53ad80f72fb1067b975be5ff597f869f05ac97f6 (patch)
tree144dbe74167e4a14603dcd9e3560898ff15e6cb1 /compilerplugins
parent0449583616bf1a73936229ec2aa333b5ecf5e882 (diff)
Record loplugin:unreffun false positive caused by a Clang bug
(see the comments at <https://gerrit.libreoffice.org/c/core/+/146634/7#message-5164bcbdb4efa4711f001ce05b670b592392d853> "test: Use css::awt::XExtentdedToolkit::addTopWindowListener()" for how this caused an issue in the wild) Change-Id: Id5ec77885db45d039aedc7e13d714aaa96572e91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148076 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/test/unreffun.cxx16
-rw-r--r--compilerplugins/clang/test/unreffun.hxx2
2 files changed, 18 insertions, 0 deletions
diff --git a/compilerplugins/clang/test/unreffun.cxx b/compilerplugins/clang/test/unreffun.cxx
index b61171a87c84..fc202b80f378 100644
--- a/compilerplugins/clang/test/unreffun.cxx
+++ b/compilerplugins/clang/test/unreffun.cxx
@@ -36,4 +36,20 @@ void l() // expected-error {{Unreferenced externally visible function definition
{
}
+void m()
+{
+//TODO: The below would produce a false "Unreferenced externally invisible function definition" for
+// Local::f due to the Clang bug addressed at <https://reviews.llvm.org/D145123> "Call
+// MarkVirtualMembersReferenced on an actual class definition":
+#if 0
+ struct Local;
+#endif
+ struct Local
+ {
+ virtual void f() {}
+ };
+ Local x;
+ (void)x;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/compilerplugins/clang/test/unreffun.hxx b/compilerplugins/clang/test/unreffun.hxx
index a209dd7b6437..7eea5233fde7 100644
--- a/compilerplugins/clang/test/unreffun.hxx
+++ b/compilerplugins/clang/test/unreffun.hxx
@@ -13,4 +13,6 @@ void f();
extern void i();
+void m();
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */