[PATCH] D120511: [clang-format] Allow to set token types final
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 27 01:41:45 PST 2022
HazardyKnusperkeks added inline comments.
================
Comment at: clang/lib/Format/FormatToken.h:382
+ }
+ bool typeIsFinalized() const { return TypeIsFinalized; }
----------------
owenpan wrote:
> I thought you didn't like using the same [[ https://reviews.llvm.org/D116316#inline-1112220 | name ]] for both a variable and function. :)
Naming a getter after the member you get should (nearly) always be done.
What I still stand to is having a local variable named after the function it is initialized from (this alone is fine), but then still calling the function in a loop. `IsPrecededByCommentOrPPDirective` is not the same as `precededByCommentOrPPDirective()` since the function relies on the changing token. I still find that very confusing, but for now I know that this code does not affect me while debugging, because I don't use the option.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120511/new/
https://reviews.llvm.org/D120511
More information about the cfe-commits
mailing list