r174504 - Optionally derive formatting information from the input file.

Douglas Gregor dgregor at apple.com
Wed Feb 6 15:31:52 PST 2013


On Feb 6, 2013, at 6:22 AM, Daniel Jasper <djasper at google.com> wrote:

> Author: djasper
> Date: Wed Feb  6 08:22:40 2013
> New Revision: 174504
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=174504&view=rev
> Log:
> Optionally derive formatting information from the input file.
> 
> With this patch, clang-format can analyze the input file for two
> properties:
> 1. Is "int *a" or "int* a" more common.
> 2. Are non-C++03 constructs used, e.g. A<A<A>>.
> 
> With Google-style, clang-format will now use the more common style for
> (1) and format C++03 compatible, unless it finds C++11 constructs in the
> input.


Haven't looked at the patch in detail, but this is an *awesome* addition.

	- Doug



More information about the cfe-commits mailing list