[all-commits] [llvm/llvm-project] 7a4cdb: [clang-format] Fix bugs in annotating r_paren as C...

Owen via All-commits all-commits at lists.llvm.org
Tue Jun 27 16:16:53 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7a4cdbeafb4c2c9fae2ac69d362d22d431404bbe
      https://github.com/llvm/llvm-project/commit/7a4cdbeafb4c2c9fae2ac69d362d22d431404bbe
  Author: Owen Pan <owenpiano at gmail.com>
  Date:   2023-06-27 (Tue, 27 Jun 2023)

  Changed paths:
    M clang/lib/Format/TokenAnnotator.cpp
    M clang/unittests/Format/TokenAnnotatorTest.cpp

  Log Message:
  -----------
  [clang-format] Fix bugs in annotating r_paren as C-style cast

Don't annotate r_paren as TT_CastRParen if it's followed by an amp/star and
either the line is in a macro definition or a numeric_constant follows the
amp/star.

Fixes #59634.

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




More information about the All-commits mailing list