summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/test/indentation.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-24 08:34:25 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-10-24 11:50:01 +0200
commita246830d3feaab033a16b2332716cff05a7ec92c (patch)
treec6551c911729001bef5e68995354c5afa3c2b56b /compilerplugins/clang/test/indentation.cxx
parent83baaec3a087f83d0ad3371d55671d9496771586 (diff)
This is fixed now on Clang trunk
...since <https://github.com/llvm/llvm-project/commit/ dc3957ec215dd17b8d293461f18696566637a6cd> "Include leading attributes in DeclStmt's SourceRange" Change-Id: I21859dfdcb454a9dd4444ce299548bf75043b1ab Reviewed-on: https://gerrit.libreoffice.org/81424 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/test/indentation.cxx')
-rw-r--r--compilerplugins/clang/test/indentation.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/compilerplugins/clang/test/indentation.cxx b/compilerplugins/clang/test/indentation.cxx
index 3a76c2c97e2f..27e858fb319c 100644
--- a/compilerplugins/clang/test/indentation.cxx
+++ b/compilerplugins/clang/test/indentation.cxx
@@ -7,6 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include "config_clang.h"
+
int foo();
int foo2(int);
@@ -49,4 +51,11 @@ void attr() {
foo();
}
+#if CLANG_VERSION >= 100000
+void attr_bad() {
+ [[maybe_unused]] int i = foo(); // expected-note {{measured against this one [loplugin:indentation]}}
+ foo(); // expected-error {{statement mis-aligned compared to neighbours [loplugin:indentation]}}
+}
+#endif
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */