diff options
author | Paul Hoad <mydeveloperday@gmail.com> | 2019-04-15 07:47:15 +0000 |
---|---|---|
committer | Paul Hoad <mydeveloperday@gmail.com> | 2019-04-15 07:47:15 +0000 |
commit | bd8a1ce7bbb9868188b6310cc7bec88bd1b830f0 (patch) | |
tree | dde615f44d0ee81546b81147e441cb7a373b2f0f /llvm/unittests/Support/CommandLineTest.cpp | |
parent | 50a09670f0d0de8e02c94716b03f538345bf49a1 (diff) | |
download | llvm-bd8a1ce7bbb9868188b6310cc7bec88bd1b830f0.zip llvm-bd8a1ce7bbb9868188b6310cc7bec88bd1b830f0.tar.gz llvm-bd8a1ce7bbb9868188b6310cc7bec88bd1b830f0.tar.bz2 |
[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
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
0 files changed, 0 insertions, 0 deletions