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/.
10 #include "sal/config.h"
12 #include "rtl/ustring.hxx"
14 template <sal_Unicode C
> OUString
f(sal_Unicode c
, int n
)
18 // expected-note-re@+1 {{literal '{{(rtl::)?}}OUString' variable defined here [loplugin:elidestringvar]}}
20 // expected-note-re@+1 {{literal '{{(rtl::)?}}OUString' variable defined here [loplugin:elidestringvar]}}
22 static constexpr OUStringLiteral
s4lit(u
"a");
23 // expected-note-re@+1 {{literal '{{(rtl::)?}}OUString' variable defined here [loplugin:elidestringvar]}}
32 // expected-error-re@+1 {{replace single use of literal '{{(rtl::)?}}OUString' variable with a literal [loplugin:elidestringvar]}}
35 // expected-error-re@+1 {{replace single use of literal '{{(rtl::)?}}OUString' variable with a literal [loplugin:elidestringvar]}}
38 // expected-error-re@+1 {{replace single use of literal '{{(rtl::)?}}OUString' variable with a literal [loplugin:elidestringvar]}}
43 // Trigger clang-cl to actually parse f under MSVC template instantiation model:
44 template OUString f
<'a'>(sal_Unicode
, int);
46 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */