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/.
11 #include <rtl/ustring.hxx>
12 #include <svl/typedwhich.hxx>
20 void f(S
const (&a
)[2])
22 // expected-error-re@+1 {{Loop variable passed by value, pass by reference instead, e.g. 'const {{(struct )?}}S&' [loplugin:rangedforcopy]}}
27 for (auto[i1
, i2
] : a
)
34 void f(std::vector
<bool> const& v
)
42 // no warning expected
44 constexpr TypedWhichId
<SvxFontItem
> EE_CHAR_FONTINFO1(12);
45 constexpr TypedWhichId
<SvxFontItem
> EE_CHAR_FONTINFO2(13);
48 for (auto nWhich
: { EE_CHAR_FONTINFO1
, EE_CHAR_FONTINFO2
})
52 // no warning expected
55 for (rtl::OUStringChar c
: { 'a', 'b' })
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */