Hi Sebastian,

I don't subscribe to the mailing list, so please cc me in any replies
or I won't see them until I browse the archives.

For your question, is there any difference between determining when to
print an AKA earlier rather than later?  If an AKA is required, does
it hurt that it is figured out earlier rather than later?  The other
point is that during conversion to a string, each diagnostic argument
can only see the previous arguments.  That means the first type in a
diagnostic can't see the other types, so it can't determine if it
needs to print an AKA.

*Sebastian Redl wrote:*

Is this the best way to do it? Can we be less eager about this, i.e.
determine whether we need the AKA when generating the string instead of
when adding the argument?


On Mon, Apr 25, 2011 at 8:38 PM, Richard Trieu <[email protected]> wrote:

> Ping.  Any comments on this patch?
>
>
> On Fri, Apr 15, 2011 at 10:25 PM, Richard Trieu <[email protected]> wrote:
>
>> See http://llvm.org/bugs/show_bug.cgi?id=9548
>>
>> When two different types has the same text representation in the same
>> diagnostic message, print an a.k.a. after the type if the a.k.a. gives extra
>> information about the type.
>>
>> class versa_string;
>>
>> typedef versa_string string;
>>
>> namespace std {template <typename T> class vector;}
>>
>> using std::vector;
>>
>> void f(vector<string> v);
>>
>> namespace std {
>> class basic_string;
>> typedef basic_string string;
>> template <typename T> class vector {};
>> void g() {
>>  vector<string> v;
>>  f(v);
>> }
>> }
>>
>> Old message:
>> ----------------
>> test.cc:15:3: error: no matching function for call to 'f'
>>  f(&v);
>>  ^
>> test.cc:7:6: note: candidate function not viable: no known conversion from
>>  'vector<string>' to 'vector<string>' for 1st argument
>> void f(vector<string> v);
>>  ^
>> 1 error generated.
>>
>> New message:
>> ---------------
>> test.cc:15:3: error: no matching function for call to 'f' f(v); ^
>> test.cc:7:6: note: candidate function not viable: no known conversion from
>> 'vector<string>' (aka 'std::vector<std::basic_string>') to 'vector<string>'
>> (aka 'std::vector<versa_string>') for 1st argument void f(vector<string> v);
>> ^ 1 error generated.
>>
>>
>>
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to