[all-commits] [llvm/llvm-project] 9b6859: [clang-tidy][readability-braces-around-statements]...

Congcong Cai via All-commits all-commits at lists.llvm.org
Mon Aug 21 23:22:16 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9b6859dc89b9578cc31811e6c122ed79ec58dac3
      https://github.com/llvm/llvm-project/commit/9b6859dc89b9578cc31811e6c122ed79ec58dac3
  Author: Congcong Cai <congcongcai0907 at 163.com>
  Date:   2023-08-22 (Tue, 22 Aug 2023)

  Changed paths:
    M clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/test/clang-tidy/checkers/readability/braces-around-statements.cpp

  Log Message:
  -----------
  [clang-tidy][readability-braces-around-statements] ignore false-positive for constexpr if statement in lambda expression

Fixed: #64545

When TreeTransform, Stmt in constexpr IfStmt will be transform to NullStmt.
This NullStmt has the different beginning token.
This patch add addtional check in checkStmt to handle this case.

Reviewed By: PiotrZSL

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




More information about the All-commits mailing list