summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/test/indentation.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-10 11:38:18 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-10-10 13:02:40 +0200
commitbfaf25f59352eb81c7f53c741995a82021f4b0ff (patch)
tree2f42915362542c93a9ebdebdeae088e73c5eed6f /compilerplugins/clang/test/indentation.cxx
parent06767a5394f1dfba71c4f0a2a07daa5664bdbd01 (diff)
Silence -Werror,-Wunused-variable (clang-cl)
Required a workaround for loplugin:indentation, until <https://reviews.llvm.org/D68581> "Include leading attributes in DeclStmt's SourceRange" lands in Clang. Change-Id: I7192969d40fa4c50bbd603d059532b9344865248 Reviewed-on: https://gerrit.libreoffice.org/80596 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.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/compilerplugins/clang/test/indentation.cxx b/compilerplugins/clang/test/indentation.cxx
index 685ec7e17e1c..3a76c2c97e2f 100644
--- a/compilerplugins/clang/test/indentation.cxx
+++ b/compilerplugins/clang/test/indentation.cxx
@@ -44,4 +44,9 @@ void top1(int x) {
foo();
}
+void attr() {
+ [[maybe_unused]] int i = foo();
+ foo();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */