From 066799b4a162aa0a4bc6aa28339f1f943a13971e Mon Sep 17 00:00:00 2001 From: Noel Date: Mon, 8 Feb 2021 15:50:13 +0200 Subject: loplugin:referencecasting check for Reference::query Change-Id: I008d16d933c70df132699872ac4c39a5c1f87b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110592 Tested-by: Jenkins Reviewed-by: Noel Grandin --- compilerplugins/clang/test/referencecasting.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compilerplugins/clang/test/referencecasting.cxx') diff --git a/compilerplugins/clang/test/referencecasting.cxx b/compilerplugins/clang/test/referencecasting.cxx index 0272bc89cc98..0864aec0f697 100644 --- a/compilerplugins/clang/test/referencecasting.cxx +++ b/compilerplugins/clang/test/referencecasting.cxx @@ -19,6 +19,8 @@ void test1(const css::uno::Reference& a) { // expected-error@+1 {{the source reference is already a subtype of the destination reference, just use = [loplugin:referencecasting]}} css::uno::Reference b(a, css::uno::UNO_QUERY); + // expected-error@+1 {{the source reference is already a subtype of the destination reference, just use = [loplugin:referencecasting]}} + auto c = css::uno::Reference::query(a); } namespace test2 -- cgit