[clang] [clang-format] Preserve trailing NOLINTEND placement with SeparateDefinitionBlocks (PR #190741)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 18 02:48:45 PDT 2026
================
@@ -291,6 +291,36 @@ TEST_F(DefinitionBlockSeparatorTest, Always) {
"struct E {};",
Style);
+ verifyFormat("// NOLINTBEGIN\n"
+ "int x = 1;\n"
+ "int y = 2;\n"
+ "// NOLINTEND\n"
+ "\n"
+ "void some_function() {}\n",
+ Style,
+ "// NOLINTBEGIN\n"
+ "int x = 1;\n"
+ "int y = 2;\n"
+ "// NOLINTEND\n"
+ "\n"
+ "void some_function() {}\n",
+ false);
----------------
owenca wrote:
I have removed the newline you still had at the end of `Code2`.
https://github.com/llvm/llvm-project/pull/190741
More information about the cfe-commits
mailing list