[cfe-commits] r170873 - in /cfe/trunk: lib/Format/Format.cpp unittests/Format/FormatTest.cpp

Daniel Jasper djasper at google.com
Fri Dec 21 02:11:49 PST 2012


Some more information about the fixes that should have been in the commit
log:

+  verifyFormat("a-- > b;");
>

With the patch we now understand (a subset of) post-increment and
post-decrement operators (we check whether the previous token is an
identifier). That this did not crop up before is probably a good sign :-).


> +  verifyFormat("b ? -a : c;");
>

Now "+" and "-" after "?" or ":" are always considered unary operators.


> +  verifyFormat("n * sizeof char16;");
>

the sizeof keyword is now handled similar to a literal, i.e. it helps
identifying the "*" as a binary operator.


> +  verifyFormat("sizeof(char);");
>

We now explicitly exclude sizeof and typeof as keywords that require a
space before the "(".

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


More information about the cfe-commits mailing list