[all-commits] [llvm/llvm-project] 5b8ffb: [clang-format] [PR45791] BeforeLambdaBody is confu...

MyDeveloperDay via All-commits all-commits at lists.llvm.org
Thu May 7 11:54:37 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b8ffb414200aa65ab26b16415a98a63d81c14ca
      https://github.com/llvm/llvm-project/commit/5b8ffb414200aa65ab26b16415a98a63d81c14ca
  Author: mydeveloperday <mydeveloperday at gmail.com>
  Date:   2020-05-07 (Thu, 07 May 2020)

  Changed paths:
    M clang/lib/Format/ContinuationIndenter.cpp
    M clang/unittests/Format/FormatTest.cpp

  Log Message:
  -----------
  [clang-format] [PR45791] BeforeLambdaBody is confused by comment inside lambda

Summary:
https://bugs.llvm.org/show_bug.cgi?id=45791

Lambda with line comment is incorrectly formatted

```
auto k = []() // comment
{ return; };
````

```
auto k = []() // comment { return; };
```

Reviewed By: Wawha

Subscribers: cfe-commits

Tags: #clang, #clang-format

Differential Revision: https://reviews.llvm.org/D79320




More information about the All-commits mailing list