[PATCH] D144709: [clang-format] Improve left to right const
Alexander Hederstaf via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 27 08:02:19 PST 2023
AlexanderHederstaf added a comment.
There are a lot of complicated cases when trying to extend this functionality. I addressed a few more and thought that it might be acceptable to avoid adjusting the qualifiers for variable declared as
struct Foo const; -> const struct Foo;
const struct Foo; -> struct Foo const;
const struct {
int a;
} foo = {5};
->
struct {
int a;
} const foo = {5};
as they are difficult to distinguish from
const struct Foo {
int a;
}
where this is not valid code
struct const Foo {
int a;
}
I have still not tested left->right->left on the llvm codebase, I'll update you when it's done.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144709/new/
https://reviews.llvm.org/D144709
More information about the cfe-commits
mailing list