[cfe-dev] Question about clang-format features.

David Blaikie dblaikie at gmail.com
Mon May 27 11:36:18 PDT 2013


On Mon, May 27, 2013 at 11:23 AM, Michael Hoye <mhoye at mozilla.com> wrote:

>
> Hi, everyone.
>
> I'd like to know if there is anything in the works to let clang-format
> provide guidance about naming conventions (camelcase,
> first-letter-capitalized, etc) in code, and if not (and if it's considered
> in-scope for clang-format) if a patch to provide that guidance would be
> interesting.
>

That's generally considered out of scope for clang-format. The goal of
clang-format is only to format code - whitespace changes only. It's the
precursor necessary to build other tools on top of, though - since anything
that would change identifiers, add/remove braces, etc, would need a
formatter to fix up lines that might've changed length in the process, etc.

The intention is to make a tool called clang-tidy that would actually fix
code to conform to naming conventions (& then reformat the result), etc,
rather than simply report them to the user & expect the user to manually
fix them.


>
> I couldn't find an answer in the list-archives; thanks for your time.


>
> - mhoye
> _______________________________________________
> 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/20130527/8ae96b48/attachment.html>


More information about the cfe-dev mailing list