Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / compilerplugins / clang / test / stringstatic.cxx
blob3c26d961c6a8a8d581203959b60b9d9ba87a9ae9
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
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/.
8 */
10 #include <rtl/ustring.hxx>
12 #include "stringstatic.hxx"
14 // expected-error@+1 {{rather declare this using OUStringLiteral/OStringLiteral/char[] [loplugin:stringstatic]}}
15 static const OUString TEST1 = "xxx";
17 void f(rtl_uString const*);
19 void test2()
21 // expected-error@+1 {{rather declare this using OUStringLiteral/OStringLiteral/char[] [loplugin:stringstatic]}}
22 static const OUString XXX = "xxx";
23 // expected-error@+1 {{rather declare this using OUStringLiteral/OStringLiteral/char[] [loplugin:stringstatic]}}
24 static const OUString XXX2 = "xxx";
25 (void)XXX;
26 (void)XXX2;
27 static const OUString DATA = "xxx";
28 f(DATA.pData);