diff options
author | Fernando Tagawa <tagawafernando@gmail.com> | 2024-02-06 21:23:12 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-06 21:23:12 -0300 |
commit | 1b03cbc93989c84ad0b78c27d4427a7eaa5842f1 (patch) | |
tree | c900bd96bd109fb80245ed0204ce219e06bedfcf /clang/unittests/Format/FormatTestComments.cpp | |
parent | 2f490583c368627f552c71e340c39f2b55c0526c (diff) | |
download | llvm-1b03cbc93989c84ad0b78c27d4427a7eaa5842f1.zip llvm-1b03cbc93989c84ad0b78c27d4427a7eaa5842f1.tar.gz llvm-1b03cbc93989c84ad0b78c27d4427a7eaa5842f1.tar.bz2 |
[clang-format] Handle doxygen commands starting with \ (#80381)
Fixes llvm/llvm-project#63241
Doxygen commands can start with `@` or `\`.
Diffstat (limited to 'clang/unittests/Format/FormatTestComments.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestComments.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestComments.cpp b/clang/unittests/Format/FormatTestComments.cpp index c249f4d..d705cf3 100644 --- a/clang/unittests/Format/FormatTestComments.cpp +++ b/clang/unittests/Format/FormatTestComments.cpp @@ -1909,6 +1909,14 @@ TEST_F(FormatTestComments, ReflowsComments) { "// @param arg", getLLVMStyleWithColumns(20))); + // Don't reflow lines starting with '\'. + verifyFormat("// long long long\n" + "// long\n" + "// \\param arg", + "// long long long long\n" + "// \\param arg", + getLLVMStyleWithColumns(20)); + // Don't reflow lines starting with 'TODO'. EXPECT_EQ("// long long long\n" "// long\n" |