bump product version to 6.3.0.0.beta1
[LibreOffice.git] / compilerplugins / clang / test / indentation.cxx
blob685ec7e17e1c1c8b4028fb20f239fa91fa379b20
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 int foo();
11 int foo2(int);
13 #define SOME_MACRO(x) foo2(x)
15 void top1(int x) {
17 foo(); // expected-note {{measured against this one [loplugin:indentation]}}
18 foo(); // expected-error {{statement mis-aligned compared to neighbours [loplugin:indentation]}}
21 foo(); // expected-note {{measured against this one [loplugin:indentation]}}
22 SOME_MACRO(1); // expected-error {{statement mis-aligned compared to neighbours SOME_MACRO [loplugin:indentation]}}
24 // no warning expected
26 foo(); foo();
28 // no warning expected
29 /*xxx*/ foo();
32 // disable this for now, ends up touching some very large switch statements in sw/ and sc/
33 switch (x)
35 case 1: foo(); break; // 1expected-note {{measured against this one [loplugin:indentation]}}
36 case 2: foo(); break; // 1expected-error {{statement mis-aligned compared to neighbours [loplugin:indentation]}}
39 #if 0
40 if (x)
41 foo();
42 else
43 #endif
44 foo();
47 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */