[llvm-commits] [llvm-gcc-4.2] r110043 - /llvm-gcc-4.2/trunk/gcc/objc/objc-act.c

Stuart Hastings stuart at apple.com
Mon Aug 2 15:12:31 PDT 2010


On Aug 2, 2010, at 1:13 PM, Eric Christopher wrote:

> 
> On Aug 2, 2010, at 12:28 PM, Stuart Hastings wrote:
> 
>> 
>> On Aug 2, 2010, at 11:49 AM, Eric Christopher wrote:
>> 
>>>> 
>>>> 
>>>> I have a test case for this, but I'm not sure how to mark it for the test suite.  The correct behavior for llvm-gcc is to issue the diagnostic (above), but clang should compile it without error (it does).
>>>> 
>>>> Is there a way for a test case to XFAIL itself only for a particular front-end (e.g. llvm-gcc versus clang) ?
>>> 
>>> #if __clang__ ?
>>> 
>>> -eric
>> 
>> Hrm.  Well, I guess I could make the test break itself when compiled with clang.  You're suggesting
>> 
>> #if __clang__
>>          BOGUS XLERB HERE;
>> #endif
>> 
>> ?
>> 
>> However, it wont' be the same diagnostic as llvm-gcc, so I can't have the test check for the (llvm-gcc only) diagnostic I want.
>> 
>> (Perhaps I mis-insterpreted your suggestion?)
> 
> 
> // dg-compile
> 
> #if __clang__
> 
> test
> 
> #else
> 
> same test but checks for { dg-error ... }

Ah, "dg-error" is a clue to what you're thinking...

> #endif
> 
> is what I was meaning.
> 
> -eric

Alas, this test is going into llvmCore/test/FrontendObjC++/..., so it will use FileCheck, and I don't think FileCheck respects #if directives.

Thanks,

stuart



More information about the llvm-commits mailing list