[all-commits] [llvm/llvm-project] 5c2e7c: [clang-format] Ensure we can correctly parse lambd...

MyDeveloperDay via All-commits all-commits at lists.llvm.org
Mon Jan 10 00:29:56 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5c2e7c9ca043d92bed75b08e653fb47c384edd13
      https://github.com/llvm/llvm-project/commit/5c2e7c9ca043d92bed75b08e653fb47c384edd13
  Author: mydeveloperday <mydeveloperday at gmail.com>
  Date:   2022-01-10 (Mon, 10 Jan 2022)

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

  Log Message:
  -----------
  [clang-format] Ensure we can correctly parse lambda in the template argument list

https://github.com/llvm/llvm-project/issues/46505

The presence of a lambda in an argument template list ignored the [] as a lambda at all, this caused the contents of the <> to be incorrectly analyzed.

```
struct Y : X < [] {
  return 0;
} > {};
```
Fixes: #46505

Reviewed By: curdeius

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




More information about the All-commits mailing list