r174504 - Optionally derive formatting information from the input file.

Manuel Klimek klimek at google.com
Wed Feb 6 12:34:09 PST 2013


On Wed, Feb 6, 2013 at 8:50 PM, Sean Silva <silvas at purdue.edu> wrote:

> > Optionally derive formatting information from the input file.
>
> A more sophisticated extension of this might be the solution to the
> "StringSwitch" issue.
>
> However, going down that road has the disadvantage that it means that
> the output depends on the formatting of the input, which loses (to
> some extent) the "canonicality" property of the formatting. (Has this
> been discussed elsewhere?).
>

Yes, this comes up every time one argues with C++ devs :)
There are multiple issues at play here:
- this change only detects configuration options, it doesn't actually
change the behavior depending on how code was formatted before in a
non-canonical way
- we already configure code according to the previous whitespaces -
obviously macros need this, but we also derive where comments belong to by
looking at whitespace around the comment
- applying "don't touch" to StringSwitch is a pretty strong example for the
other end of the spectrum, and I'd strongly vote against doing this for as
long as possible ;)

Cheers,
/Manuel


>
> -- Sean Silva
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130206/3a0a2678/attachment.html>


More information about the cfe-commits mailing list