summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/test/referencecasting.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/test/referencecasting.cxx')
-rw-r--r--compilerplugins/clang/test/referencecasting.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/compilerplugins/clang/test/referencecasting.cxx b/compilerplugins/clang/test/referencecasting.cxx
index 87324bb86fd6..0272bc89cc98 100644
--- a/compilerplugins/clang/test/referencecasting.cxx
+++ b/compilerplugins/clang/test/referencecasting.cxx
@@ -147,4 +147,13 @@ struct Test13
}
};
+void test14(css::uno::Sequence<css::uno::Reference<css::io::XStreamListener>> seq)
+{
+ for (sal_Int32 i = 0; i < seq.getLength(); ++i)
+ {
+ // expected-error@+1 {{the source reference is already a subtype of the destination reference, just use = [loplugin:referencecasting]}}
+ css::uno::Reference<css::io::XStreamListener> xDataSeries(seq[i], css::uno::UNO_QUERY);
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */