[cfe-dev] C++ using-directive parsing

Douglas Gregor dgregor at apple.com
Mon Dec 29 19:27:30 PST 2008


On Dec 29, 2008, at 5:25 PM, Piotr Rak wrote:

> 2008/12/29 Douglas Gregor <dgregor at apple.com>:
>> On Dec 28, 2008, at 12:32 AM, Piotr Rak wrote:
>>>
>>> 2008/12/27 Douglas Gregor <dgregor at apple.com>:
>>
>> +  } else {
>> +    Diag(IdentLoc, diag::err_expected_namespace_name);
>> +    // FIXME: if SS.isSet() we could note about NamespcName not  
>> being
>> +    // member of DC, or not namespace name.
>> +  }
>>
>> Instead of mentioning DC (which means trying to format it into a  
>> readable
>> name in the error message), I suggest just underlying the range  
>> with, e.g.,
>>
>>       Diag(IdentLoc, diag::err_expected_namespace_name) <<
>> SS.getSourceRange();
>
> I meant additional giving note something like: 'C is not member of  
> D::B'

We could do that, too, although we don't yet have the ability to print  
a CXXScopeSpec (this isn't hard to add).

>
>> Anyway, these are minor things. If you would send the updated
>> cxx-using-directive.cpp test case you mentioned, I'll be happy to  
>> integrate
>> your patch into the Clang repository. Thanks!
>>
>>       - Doug
>
> Sorry, about that, attached now!


Okay, committed. Thanks!

	- Doug



More information about the cfe-dev mailing list