[all-commits] [llvm/llvm-project] c91639: [clang-format] Treat &/&& as reference when follow...
Emilia Dreamer via All-commits
all-commits at lists.llvm.org
Tue Mar 14 03:46:26 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c9163901c8e118ec0b7d415ae6ef267c4b6d549f
https://github.com/llvm/llvm-project/commit/c9163901c8e118ec0b7d415ae6ef267c4b6d549f
Author: Emilia Dreamer <emilia at rymiel.space>
Date: 2023-03-14 (Tue, 14 Mar 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] Treat &/&& as reference when followed by requires clause
Previously, the token annotator would get confused and annotate a member
function's ref qualifier as a binary operator, if said function also had
a requires clause after it.
This patch accounts for that, treating requires clauses more similarly
to `noexcept`, which also comes after the ref qualifier.
Fixes https://github.com/llvm/llvm-project/issues/61270
Reviewed By: HazardyKnusperkeks, owenpan
Differential Revision: https://reviews.llvm.org/D145656
More information about the All-commits
mailing list