diff options
author | Daniel Jasper <djasper@google.com> | 2013-09-27 07:49:08 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-09-27 07:49:08 +0000 |
commit | 48c099f45400e37ec1cde7de5eaee5cce65dbd42 (patch) | |
tree | 2d2264a0d58bc74e7958e2779db1d0e81c14a124 /unittests | |
parent | fe16aa31fdfaad4c38aed443d853af293714f1c4 (diff) | |
download | clang-48c099f45400e37ec1cde7de5eaee5cce65dbd42.tar.gz |
clang-format: Fix formatting bug with comment in weird place.
Before:
template <typename T>
// T should be one of {A, B}.
void f() {}
After:
template <typename T>
// T should be one of {A, B}.
void f() {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191492 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 0175413a50..be2a45d199 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -3500,6 +3500,9 @@ TEST_F(FormatTest, WrapsAtFunctionCallsIfNecessary) { TEST_F(FormatTest, WrapsTemplateDeclarations) { verifyFormat("template <typename T>\n" "virtual void loooooooooooongFunction(int Param1, int Param2);"); + verifyFormat("template <typename T>\n" + "// T should be one of {A, B}.\n" + "virtual void loooooooooooongFunction(int Param1, int Param2);"); verifyFormat( "template <typename T>\n" "using comment_to_xml_conversion = comment_to_xml_conversion<T, int>;"); |