hanchenye-llvm-project/clang/unittests/Format
Paul Hoad bd8a1ce7bb [clang-format] [PR41170] Break after return type ignored with certain comments positions
Summary:
Addresses https://bugs.llvm.org/show_bug.cgi?id=41170

The AlwaysBreakAfterReturn type setting can go wrong if the line ends with a comment
```
void foo() /* comment */
```
or

```
void foo() // comment
```

It will incorrectly see such functions as Declarations and not Definitions

The following code addresses this by looking for function which end with `; <comment>` rather than just `;` or `<comment>`

Reviewers: klimek, djasper, reuk, russellmcc, owenpan, sammccall
Reviewed By: owenpan
Subscribers: lebedev.ri, cfe-commits, sammccall
Tags: #clang
Differential Revision: https://reviews.llvm.org/D60363

llvm-svn: 358375
2019-04-15 07:47:15 +00:00
..
CMakeLists.txt [clang-format] Add basic support for formatting C# files 2019-03-21 13:09:22 +00:00
CleanupTest.cpp [clang-format] Regroup #includes into blocks for Google style 2019-04-03 09:25:16 +00:00
FormatTest.cpp [clang-format] [PR41170] Break after return type ignored with certain comments positions 2019-04-15 07:47:15 +00:00
FormatTestCSharp.cpp [clang-format] Add basic support for formatting C# files 2019-03-21 13:09:22 +00:00
FormatTestComments.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatTestJS.cpp [clang-format] [JS] handle private members. 2019-03-19 12:28:41 +00:00
FormatTestJava.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatTestObjC.cpp [clang-format] Refine structured binding detection 2019-03-25 17:29:16 +00:00
FormatTestProto.cpp [clang-format] Use SpacesBeforeTrailingComments for "option" directive 2019-04-12 10:11:34 +00:00
FormatTestRawStrings.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatTestSelective.cpp [clang-format] [PR25010] AllowShortIfStatementsOnASingleLine not working if an "else" statement is present 2019-03-13 08:26:39 +00:00
FormatTestTableGen.cpp [clang-format][TableGen] Don't add spaces around items in square braces. 2019-03-01 00:12:18 +00:00
FormatTestTextProto.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatTestUtils.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
NamespaceEndCommentsFixerTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SortImportsTestJS.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SortImportsTestJava.cpp [clang-format] [PR41187] moves Java import statements to the wrong location if code contains statements that start with the word import 2019-03-30 13:05:40 +00:00
SortIncludesTest.cpp [clang-format] Preserve include blocks in ObjC Google style 2019-04-04 14:04:26 +00:00
UsingDeclarationsSorterTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00