On May 4, 2011, at 1:48 AM, Sebastian Redl wrote:

> 
> On 04.05.2011, at 08:31, John McCall wrote:
> 
>> On May 3, 2011, at 10:57 PM, Sean Hunt wrote:
>>> The PCH test is XFAILed because we currently can't deal with a note
>>> emitted in the header
>> 
>> An expected-note on the corresponding line in the main file works.
>> It's a hack, but it's one we've used elsewhere.
> 
> I've switched to doing PCH tests this way:
> 
> // test.cpp
> // Without PCH:
> // RUN: ... -include test.cpp -fsytax-only test.cpp
> // With PCH:
> // RUN: ... -emit-pch -o test.pch test.cpp
> // RUN: ... -include-pch test.pch -fsyntax-only test.cpp
> #if !defined(PASS1)
> #define PASS1
> // We're the "header"
> code here // expected-diagnostic
> 
> #else
> // Main pass.
> 
> #endif
> 
> This allows you to place the verify comments where they belong.

Cool hack!

        - Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to