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

David Blaikie dblaikie at gmail.com
Sun Aug 21 22:04:26 PDT 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110821/177a9754/attachment.html>


More information about the cfe-dev mailing list