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"
15 #define SOME_MACRO(x) foo2(x)
19 foo(); // expected-note {{measured against this one [loplugin:indentation]}}
20 foo(); // expected-error {{statement mis-aligned compared to neighbours [loplugin:indentation]}}
23 foo(); // expected-note {{measured against this one [loplugin:indentation]}}
24 SOME_MACRO(1); // expected-error {{statement mis-aligned compared to neighbours SOME_MACRO [loplugin:indentation]}}
26 // no warning expected
30 // no warning expected
34 // disable this for now, ends up touching some very large switch statements in sw/ and sc/
37 case 1: foo(); break; // 1expected-note {{measured against this one [loplugin:indentation]}}
38 case 2: foo(); break; // 1expected-error {{statement mis-aligned compared to neighbours [loplugin:indentation]}}
43 foo(); // expected-error {{if body should be indented [loplugin:indentation]}}
53 foo(); // expected-error {{else body should be indented [loplugin:indentation]}}
64 else // expected-error {{if and else not aligned [loplugin:indentation]}}
83 [[maybe_unused
]] int i
= foo();
87 #if CLANG_VERSION >= 100000
89 [[maybe_unused
]] int i
= foo(); // expected-note {{measured against this one [loplugin:indentation]}}
90 foo(); // expected-error {{statement mis-aligned compared to neighbours [loplugin:indentation]}}
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */