[PATCH] D127873: [clang-format] Fix misplacement of `*` in declaration of pointer to struct
Jack Huang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 14 04:29:19 PDT 2022
jackhong12 added a comment.
I think we cannot identify `struct`, `union`, `class` or `enum` by the right bracket. Clang-format will split the input into multiple lines. For instance `struct Tmp {} *tmp;` will be separated as `struct Tmp {` and `} *tmp;`. In annotating, we only handle the relation of tokens in a single line, so we cannot know whether `}` belongs to `struct` or not.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127873/new/
https://reviews.llvm.org/D127873
More information about the cfe-commits
mailing list