[PATCH] D143755: [clang-format] Add a space between an overloaded operator and '>'

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 10 09:20:24 PST 2023


owenpan created this revision.
owenpan added reviewers: MyDeveloperDay, HazardyKnusperkeks, rymiel.
owenpan added a project: clang-format.
Herald added a project: All.
owenpan requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

The token annotator doesn't annotate the template opener and closer as such if they enclose an overloaded operator. This causes the space between the operator and the closer to be removed, resulting
in invalid C++ code.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143755

Files:
  clang/lib/Format/TokenAnnotator.cpp
  clang/unittests/Format/FormatTest.cpp
  clang/unittests/Format/TokenAnnotatorTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143755.496514.patch
Type: text/x-patch
Size: 5758 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230210/ef6086d7/attachment.bin>


More information about the cfe-commits mailing list