[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 18 00:45:26 PST 2022

curdeius added a comment.

As MyDeveloperDay justly pointed out, adding a new language enum LK_C doesn't seem to be the way to go, as you mostly duplicate all the conditions (probably missing some of them).
For the usability, it would be really painful to specify the language for each file that should be considered as C.
So, sorry for this forth and back, but now at least we see that your initial approach was actually better (but please add tests!).

> We'd maybe need to add C as language option and let the user specify the language (-x c?).
> That in turn may be painful (because not automatic).

Yeah, I should have been more explicit here.

Comment at: .arclint:15-16
\ No newline at end of file

Please don't change unrelated files.

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list