diff options
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r-- | compilerplugins/clang/test/unreffun.cxx | 16 | ||||
-rw-r--r-- | compilerplugins/clang/test/unreffun.hxx | 2 |
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: */ |