[cfe-dev] clang-format and "ASCII art" formatting

Daniel Jasper djasper at google.com
Fri Dec 7 08:18:25 PST 2012


Hi all,

although I think we can make clang-format (clang/lib/Format) format more
and more pieces of C++ according to a specific style, I am convinced that
there are cases where automatic formatting is not the right solution.

An example is:
http://clang.llvm.org/doxygen/ParseExpr_8cpp-source.html line 60-90. Here,
careful human thought leads to much more readable code then simply
following a style guide.

In order to handle such cases and still be able to auto-format entire
files, I propose to add certain markers around areas of a file that
clang-format should not touch. Does anyone have thoughts on this? How would
we best design this? Add special comments like "// NO clang-format {"?

Cheers,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121207/3c06142e/attachment.html>


More information about the cfe-dev mailing list