[cfe-dev] [clang-format] [clang-extra-tools] How to insert an additional token in clang-format?

David Blaikie dblaikie at gmail.com
Wed Jul 31 07:31:23 PDT 2013


That's out of scope for clang-format. Clang-format is designed to only make
whitespace changes, not to introduce or remove tokens.

Clang-tidy is the next project (in very early stages) layered on top of
clang-format that will make the kind of changes you're talking about.
Hi,
I'd like to add an additional rule to clang-format.
Namely, I'd like to have an option to surround short if statements and
short loops with braces '{', '}'.
What's the best way to do it, i.e. to add an additional token (here,
tok::l_brace and tok::r_brace)?

Regards,
Marek Kurdej

_______________________________________________
cfe-dev mailing list
cfe-dev at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130731/1f5a39b6/attachment.html>


More information about the cfe-dev mailing list