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/.
13 #define SOME_MACRO(x) foo2(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
28 // no warning expected
32 // disable this for now, ends up touching some very large switch statements in sw/ and sc/
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]}}
41 foo(); // expected-error {{if body should be indented [loplugin:indentation]}}
49 { // expected-note {{start brace here [loplugin:indentation]}}
51 } // expected-error {{start and end brace not aligned [loplugin:indentation]}}
53 if (x
) // expected-note {{statement beginning here [loplugin:indentation]}}
54 { // expected-error {{start brace not aligned with beginning of parent statement [loplugin:indentation]}}
61 foo(); // expected-error {{else body should be indented [loplugin:indentation]}}
72 else // expected-error {{if and else not aligned [loplugin:indentation]}}
91 [[maybe_unused
]] int i
= foo();
96 [[maybe_unused
]] int i
= foo(); // expected-note {{measured against this one [loplugin:indentation]}}
97 foo(); // expected-error {{statement mis-aligned compared to neighbours [loplugin:indentation]}}
105 xxx(); // expected-error {{body inside brace not indented [loplugin:indentation]}}
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */