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 <config_clang.h>
11 #include <rtl/ustring.hxx>
12 #include <rtl/string.hxx>
18 m_field1
; // expected-error {{const field can be static [loplugin:staticconstfield]}}
21 // expected-note@-1 {{init here [loplugin:staticconstfield]}}
30 m_field2
; // expected-error {{const field can be static [loplugin:staticconstfield]}}
33 // expected-note@-1 {{init here [loplugin:staticconstfield]}}
39 // no warning expected
57 m_fielda1
; // expected-error {{const field can be static [loplugin:staticconstfield]}}
58 int const m_fielda2
; // expected-error {{const field can be static [loplugin:staticconstfield]}}
60 m_fielda3
; // expected-error {{const field can be static [loplugin:staticconstfield]}}
62 m_fielda4
; // expected-error {{const field can be static [loplugin:staticconstfield]}}
65 // expected-note@-1 {{init here [loplugin:staticconstfield]}}
67 // expected-note@-1 {{init here [loplugin:staticconstfield]}}
69 // expected-note@-1 {{init here [loplugin:staticconstfield]}}
70 , m_fielda4(Enum::ONE
)
71 // expected-note@-1 {{init here [loplugin:staticconstfield]}}
80 // no warning expected
95 , m_fieldb4(Enum::ONE
)
104 // no warning expected, checking for assigning to const field from multiple constructors
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */