Patch for clang-format to allow references and pointers to bind differently
Alp Toker
alp at nuanti.com
Thu Dec 5 01:39:35 PST 2013
On 04/12/2013 22:45, Daniel Jasper wrote:
> --detect-style will be nice, but it is going to be significantly more
> effort than you might think.
Returning to my idea to "leave X formatting untouched", I imagine this
might give Ben a chance to get usage out of the tool while also becoming
a first step towards --detect-style.
The algorithm would be roughly:
for each formatting criterion X, apply X alone to the in-memory buffer
and count deltas. Report ambiguity if Xn == 0, otherwise select X with
lowest number of deltas as the detected style variable.
I'm sure there are other ways to do it, so just throwing about the idea
if only to avoid the perennial debate on what constitutes acceptable
corner-case styles :-)
Alp.
--
http://www.nuanti.com
the browser experts
More information about the cfe-commits
mailing list