diff options
author | Krasimir Georgiev <krasimir@google.com> | 2017-05-18 07:36:21 +0000 |
---|---|---|
committer | Krasimir Georgiev <krasimir@google.com> | 2017-05-18 07:36:21 +0000 |
commit | ba6b315ea92fec6bdf5092511c23f6681805cfd0 (patch) | |
tree | eb18121afccbab65664b0db2644999a98d737953 /clang/unittests/Format/FormatTestComments.cpp | |
parent | 00211c3faa581179fe5c5c90818db92a262c62f2 (diff) | |
download | bcm5719-llvm-ba6b315ea92fec6bdf5092511c23f6681805cfd0.tar.gz bcm5719-llvm-ba6b315ea92fec6bdf5092511c23f6681805cfd0.zip |
clang-format: fix prefix for doxygen comments after member
Summary:
Doxygen supports putting documentation blocks after member, by adding
an additional < marker in the comment block. This patch makes sure
this marker is used in lines which are introduced by breaking the
comment.
int foo; ///< Some very long comment.
becomes:
int foo; ///< Some very long
///< comment.
Contributed by @Typz!
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: djasper, klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D33282
llvm-svn: 303330
Diffstat (limited to 'clang/unittests/Format/FormatTestComments.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestComments.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestComments.cpp b/clang/unittests/Format/FormatTestComments.cpp index 4238efe54f0..f6d47104e11 100644 --- a/clang/unittests/Format/FormatTestComments.cpp +++ b/clang/unittests/Format/FormatTestComments.cpp @@ -1198,6 +1198,16 @@ TEST_F(FormatTestComments, ReflowsComments) { format("/* long long long long\n" " * long */", getLLVMStyleWithColumns(20))); + EXPECT_EQ("///< long long long\n" + "///< long long\n", + format("///< long long long long\n" + "///< long\n", + getLLVMStyleWithColumns(20))); + EXPECT_EQ("//!< long long long\n" + "//!< long long\n", + format("//!< long long long long\n" + "//!< long\n", + getLLVMStyleWithColumns(20))); // Don't bring leading whitespace up while reflowing. EXPECT_EQ("/* long long long\n" |