This change breaks no existing tests but does fix the linked issue.
Declarations of operator overloads are annotated with
TT_FunctionDeclarationName on the operator keyword, which is already
being checked for when aligning, so the extra kw_operator doesn't seem
to be necessary. (just for reference, it was added in
rG92b397fb9d55ccdf4632c2b1b15b4a0ee417cf74 / 92b397fb9d55ccdf4632c2b1b15b4a0ee417cf74)
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| clang/unittests/Format/FormatTest.cpp | ||
|---|---|---|
| 17939 | Add a full stop. | |
| 17939–17946 | Consider using a test case similar to the examples in https://github.com/llvm/llvm-project/issues/55733 or not adding a test case at all as the added annotator tests will cover it. | |
| 17945 | Remove the newline. | |
| clang/unittests/Format/TokenAnnotatorTest.cpp | ||
| 441–456 | Instead of adding new tests, you can add checks for kw_operator and TT_FunctionDeclarationName to the existing ones. | |
| clang/unittests/Format/TokenAnnotatorTest.cpp | ||
|---|---|---|
| 441–456 | I wanted to have tests that are declaring operator functions, not just calling them | |
Add a full stop.