[cfe-dev] Quirky diagnostic/fixit when using insertions

Francois Pichet pichet2000 at gmail.com
Mon Aug 22 09:53:44 PDT 2011


On Mon, Aug 22, 2011 at 1:04 AM, David Blaikie <dblaikie at gmail.com> wrote:
> I came across the following diagnostic output when I examined the output of
> test/FixIt/fixit-cxx0x.cpp:
>
> /tmp/webcompile/_934_0.cc:8:3: error: switch condition type 'foo' requires
> explicit conversion to 'int'
>   switch(foo())
>   ^
>          stati)_cast<int>(
>
> Which shows two problems:
>
> 1) Multiple carets points don't seem to be shown, only the first one (in
> this case, the location of the diagnostic, not the location of either of the
> suggested FixIts)
> 2) If two FixIts overlap, in this case causing the second (")") to be
> embedded inside the first (replacing the "c" in "static")
>
> Are these known issues? Has there been any thought/discussion on how they
> should be fixed? (I imagine fixing (1) shouldn't be terribly hard, but I
> haven't looked. Though (2) will presumably require slightly more work to
> shift the fixits across and make it clear which piece is to be inserted
> where)
>
> - David

Hi,
Yes I also noticed this problem last week.
I filled a bugzilla:
http://llvm.org/bugs/show_bug.cgi?id=10696



More information about the cfe-dev mailing list