[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 16:24:17 PDT 2010
On Aug 2, 2010, at 3:44 PM, Dale Johannesen wrote:
>>>>
>>>> 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.
>
> #if __clang__
> #error text close enough to gcc's error message to fool grep
> #endif
>
> It's a real hack, though. IMO improving the mechanism is a better way forward. Different compilers won't report the same error the same way, and the mechanism should understand that.
Wow. That's ... "ingenious." (Not the first word I thought of.) Regardless of my initial reaction, that's pretty diabolical, Dale. I'm impressed! :-) In fact, I'm going to do just that (thank you for the suggestion!). The diagnostic is already wired into the test, inside a "CHECK:" line, so I'm not making it any less portable.
FWIW, Daniel says he regards all the LLVM Frontend* tests as LLVM-GCC-specific, and is quite unconcerned about making Clang pass them.
stuart
More information about the llvm-commits
mailing list