[cfe-dev] [Patch] Refactor Sema::CppLookupName

Douglas Gregor dgregor at apple.com
Fri Feb 6 11:28:47 PST 2009


On Feb 6, 2009, at 9:07 AM, Sebastian Redl wrote:

> Douglas Gregor wrote:
>> Hi Piotr,
>>
>> On Feb 6, 2009, at 2:29 AM, Piotr Rak wrote:
>>
>>> 2009/2/5 Douglas Gregor <dgregor at apple.com>:
>>>
>>>> Interesting, this test uncovered an unfortunate issue. Since we
>>>> added code
>>>> to report ambiguous type-name lookups in Sema::getTypeName, we
>>>> actually get
>>>> *two* sets of ambiguity diagnostics regarding
>>>>
>>>>      X();
>>>>
>>>>
>>> Do we want 'clang -verify' warn when such things happen? Now in such
>>> case tests will silently passes.
>>>
>>
>> It would be helpful to teach -verify to do that, yes.
>>
>>
> How about something like
>
> // expected-diag {{...}} -> allow the diagnostic 1+ times (in order to
> not mess up current test cases)
> // expected-diag 2 {{...}}} -> demand the diagnostic exactly twice

Great idea!

	- Doug



More information about the cfe-dev mailing list