[clang-format] Don't reflow comment lines starting with '@'.
Summary:
This patch stops reflowing comment lines starting with '@', since they commonly
have a special meaning.
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D29323
llvm-svn: 293617
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 4d4b64b..7348fa0 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -2244,6 +2244,15 @@
"// long long long long\n"
"// ... --- ...",
getLLVMStyleWithColumns(20)));
+
+ // Don't reflow lines starting with '@'.
+ EXPECT_EQ("// long long long\n"
+ "// long\n"
+ "// @param arg",
+ format("// long long long long\n"
+ "// @param arg",
+ getLLVMStyleWithColumns(20)));
+
// Reflow lines that have a non-punctuation character among their first 2
// characters.
EXPECT_EQ("// long long long\n"