On Mar 18, 2009, at 5:26 PM, Mike Stump wrote:
> On Mar 18, 2009, at 5:18 PM, Douglas Gregor wrote:
>> Introduce a representation for types that we referred to via a
>> qualified name
>
> I'll give you a cookie if you add a pretty printer for all of this
> (aka -ast-print). :-)
It's already done. QualifiedNameTypes have support for
getAsStringInternal, which is used to print types in the AST as well
as for diagnostics. So, given:
foo::wibble::x a;
::bar::y b;
a + b;
we'll get an error message like:
error: invalid operands to binary expression ('foo::wibble::x' (aka
'struct x') and '::bar::y' (aka 'int'))
a + b;
~ ^ ~
And if you go ahead and pretty-print , a and b will come out as:
foo::wibble::x a;
::bar::y b;
Cookie collected and enjoyed ;)
- Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits