compilerplugins/clang/test/unreffun.cxx | 14 ++++++++++++++ compilerplugins/clang/test/unreffun.hxx | 2 ++ 2 files changed, 16 insertions(+)
New commits: commit e49a3970f8bdc47721460ed0dfea38d0b7accbb8 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Sep 14 15:17:44 2018 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Fri Sep 14 16:39:20 2018 +0200 Check that loplugin:unreffun warns for explicitly "extern" functions Change-Id: Ic43f007af4480b358916c2b27796a9b248ea9eb7 Reviewed-on: https://gerrit.libreoffice.org/60496 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/compilerplugins/clang/test/unreffun.cxx b/compilerplugins/clang/test/unreffun.cxx index d9d56afe3c35..b61171a87c84 100644 --- a/compilerplugins/clang/test/unreffun.cxx +++ b/compilerplugins/clang/test/unreffun.cxx @@ -22,4 +22,18 @@ void h() // expected-error {{Unreferenced externally visible function definition { } +void i() {} + +extern void j(); // expected-error {{Unreferenced function declaration [loplugin:unreffun]}} + +extern void +k() // expected-error {{Unreferenced externally visible function definition [loplugin:unreffun]}} +{ +} + +extern void l(); // expected-note {{first declaration is here [loplugin:unreffun]}} +void l() // expected-error {{Unreferenced externally visible function definition [loplugin:unreffun]}} +{ +} + /* 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 20d0e50056be..1df26658429d 100644 --- a/compilerplugins/clang/test/unreffun.hxx +++ b/compilerplugins/clang/test/unreffun.hxx @@ -12,6 +12,8 @@ void f(); +extern void i(); + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits