Skip to content
Commit bd8a1ce7 authored by Paul Hoad's avatar Paul Hoad
Browse files

[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
parent 50a09670
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment