[all-commits] [llvm/llvm-project] e4d3e8: [clang-format] Don't allow template to be preceded...

Emilia Kond via All-commits all-commits at lists.llvm.org
Tue May 16 15:38:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e4d3e88802390a51ae62ade18e48c1a65a862d12
      https://github.com/llvm/llvm-project/commit/e4d3e88802390a51ae62ade18e48c1a65a862d12
  Author: Emilia Kond <emilia at rymiel.space>
  Date:   2023-05-17 (Wed, 17 May 2023)

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

  Log Message:
  -----------
  [clang-format] Don't allow template to be preceded by closing brace

This check is similar to the right paren check right below it, but it
doesn't need the overloaded operator check.

This patch prevents brace-initialized objects that are being compared
from being mis-annotated as template parameters.

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

Reviewed By: owenpan, MyDeveloperDay

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




More information about the All-commits mailing list