[cfe-commits] r58001 - in /cfe/trunk: include/clang/AST/Type.h include/clang/AST/TypeOrdering.h lib/AST/InheritViz.cpp lib/Sema/SemaDeclCXX.cpp
Doug Gregor
doug.gregor at gmail.com
Thu Oct 23 22:08:34 PDT 2008
On Thu, Oct 23, 2008 at 9:52 PM, Chris Lattner <clattner at apple.com> wrote:
> On Oct 22, 2008, at 6:38 PM, Doug Gregor wrote:
>>
>> It occurs to me that, if we were sufficiently crazy, we could actually
>> use this in (HTML) error messages. If you trigger an ambiguous
>> conversion from a derived pointer to a base pointer (where there are
>> multiple bases of the same type), it could show you the various paths.
>> I was actually planning to just print the paths in ASCII, e.g.,
>> D->B->A, D->C->A, but showing it graphically would be way cooler.
>
> Wow, that would be really cool to do someday. This is also something that
> could be exposed through a sufficiently smart IDE. If you have good crazy
> ideas like this, please add them to the clang/NOTES.txt file so they just
> don't get lost.
With the recent commit of the ambiguous derived-to-base conversion
checking code, we print out the ambiguous paths in ASCII as part of
the error message. Turning that into a GraphViz visualization, for
example, would only take a 1/2 hour's worth of work, since we have all
of the necessary information available already.
- Doug
More information about the cfe-commits
mailing list