kazutakahirata wrote: > Creating a PR with `[](PrintingPolicy [[maybe_unused]] & Policy) { > Policy.SuppressTagKeyword = true; };` on those tests.
I get this error while running `ninja check-clang-unit`. My build tree is configured with `-DCMAKE_CXX_COMPILER=/usr/bin/clang++` and `-DLLVM_ENABLE_WERROR=On`. By the way: ``` [](PrintingPolicy [[maybe_unused]] &Policy) { Policy.SuppressTagKeyword = false; }; ``` would result in: ``` clang/unittests/AST/DeclPrinterTest.cpp:1394:23: error: 'maybe_unused' attribute cannot be applied to types ``` ``` [[maybe_unused]] [](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; }; ``` would result in: ``` clang/unittests/AST/DeclPrinterTest.cpp:1394:5: error: 'maybe_unused' attribute cannot be applied to a statement ``` I don't know where to put `[[maybe_unused]]`. https://github.com/llvm/llvm-project/pull/86339 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits