[all-commits] [llvm/llvm-project] dc142e: [clang-format] Correctly recognize binary operator...

Marek Kurdej via All-commits all-commits at lists.llvm.org
Thu Mar 17 01:37:46 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dc142ea184a526fb2879f84c4c82fff195d36b9d
      https://github.com/llvm/llvm-project/commit/dc142ea184a526fb2879f84c4c82fff195d36b9d
  Author: Marek Kurdej <marek.kurdej+llvm.org at gmail.com>
  Date:   2022-03-17 (Thu, 17 Mar 2022)

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

  Log Message:
  -----------
  [clang-format] Correctly recognize binary operators in template arguments with parenthesized literals.

Fixes https://github.com/llvm/llvm-project/issues/24602.

Before, code like `foo<b & 1>` was formatted correctly but `foo<b & (1)>` wasn't.
This patch fixes this inconsistency.

Reviewed By: HazardyKnusperkeks, owenpan

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




More information about the All-commits mailing list