summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/test
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-01-28 20:29:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-29 09:25:12 +0100
commit1250aecd71fabde4dba990bfceb61bbe8e06b8ea (patch)
tree3c42ffdf68b7e81aba29228631a8cd34e2f11830 /compilerplugins/clang/test
parent4f3987e0b1a995431478769c898b5ef151745254 (diff)
loplugin:stringviewparam extend to new..
O[U]StringBuffer methods Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins/clang/test')
-rw-r--r--compilerplugins/clang/test/stringviewparam.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/compilerplugins/clang/test/stringviewparam.cxx b/compilerplugins/clang/test/stringviewparam.cxx
index 24dab18e0f9c..a9fcab3ac3a0 100644
--- a/compilerplugins/clang/test/stringviewparam.cxx
+++ b/compilerplugins/clang/test/stringviewparam.cxx
@@ -13,6 +13,7 @@
#include "rtl/string.hxx"
#include "rtl/ustring.hxx"
+#include "rtl/ustrbuf.hxx"
#include "sal/types.h"
void f1a(std::string_view);
@@ -83,4 +84,11 @@ struct S10
}
};
+// expected-error@+1 {{replace function parameter of type 'const rtl::OUString &' with 'std::u16string_view' [loplugin:stringviewparam]}}
+void f11(const OUString& f11rString)
+{
+ OUStringBuffer buf;
+ buf.append(f11rString);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */