[cfe-commits] r159980 - /cfe/trunk/docs/InternalsManual.html

Nico Weber thakis at chromium.org
Thu Jul 19 10:38:49 PDT 2012


On Mon, Jul 9, 2012 at 10:03 PM, Chris Lattner <sabre at nondot.org> wrote:
> Author: lattner
> Date: Tue Jul 10 00:03:05 2012
> New Revision: 159980
>
> URL: http://llvm.org/viewvc/llvm-project?rev=159980&view=rev
> Log:
> Jordan points out that this was incorrect: clang should recover from
> *errors* with fixits on them by following the recovery advised by the
> fixit, but if it is a fixit on a warning, then obviously the AST
> should be for the code as-written.

For what it's worth, for some warnings it's necessary to do recovery
for warning fixits (for example for unqualified base member access in
templates, which is allowed in microsoft mode but an error elsewhere.
Since it's an error normally, the AST isn't correct and gets fixed
when the fixit is emitted).

>
> Modified:
>     cfe/trunk/docs/InternalsManual.html
>
> Modified: cfe/trunk/docs/InternalsManual.html
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/InternalsManual.html?rev=159980&r1=159979&r2=159980&view=diff
> ==============================================================================
> --- cfe/trunk/docs/InternalsManual.html (original)
> +++ cfe/trunk/docs/InternalsManual.html Tue Jul 10 00:03:05 2012
> @@ -453,8 +453,7 @@
>  <li>Since they are automatically applied if <code>-Xclang -fixit</code>
>  is passed to the driver, they should only be used when it's very likely they
>  match the user's intent.</li>
> -<li>Clang must recover from the error or warning as if the fix-it had been
> -applied.</li>
> +<li>Clang must recover from errors as if the fix-it had been applied.</li>
>  </ul>
>
>  <p>If a fix-it can't obey these rules, put the fix-it on a note. Fix-its on
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list