1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 #include "sal/config.h"
13 #include <string_view>
14 #include "rtl/string.hxx"
15 #include "rtl/ustring.hxx"
16 #include "rtl/ustrbuf.hxx"
17 #include "sal/types.h"
19 void f1(std::string_view sv
)
21 // expected-error-re@+1 {{replace var of type '{{(rtl::)?}}OString' with 'std::string_view' [loplugin:stringviewvar]}}
26 void f2(const OString s1
)
28 // no warning expected
33 std::string_view
f3a();
36 // expected-error-re@+1 {{replace var of type '{{(rtl::)?}}OString' with 'std::string_view' [loplugin:stringviewvar]}}
37 OString s1
= OString(f3a());
41 void f4a(const OString
&);
42 void f4(std::string_view sv
)
44 // no warning expected
49 void f5(std::string_view sv
)
51 // expected-error-re@+1 {{replace var of type '{{(rtl::)?}}OString' with 'std::string_view' [loplugin:stringviewvar]}}
57 void f6(std::u16string_view sv
)
59 // expected-error-re@+1 {{replace var of type '{{(rtl::)?}}OUString' with 'std::u16string_view' [loplugin:stringviewvar]}}
65 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */