[cfe-commits] r85170 - in /cfe/trunk/test/Preprocessor: c99-6_10_3_3_p4.c macro_disable3.c macro_rparen_scan2.c

Chris Lattner clattner at apple.com
Mon Oct 26 20:33:49 PDT 2009


On Oct 26, 2009, at 6:49 PM, Edward O'Callaghan wrote:

> G'Day,
>
> As per requested; Passing "-strict-whitespace" to FileCheck has been
> fixed in revision 85194.
> Thanks for both the kind words and post review Chris !

Thanks!

> May I ask why the Clang test suit has the " // " run syntax and the
> LLVM test suit uses " ; " ?

";" is the comment character for "llvm-as" and // is a comment  
character in C.  In addition to being input for filecheck, the file  
has to run through llvm-as/clang etc.

-Chris

>
> Best Regards,
> Edward.
>
> 2009/10/27 Chris Lattner <clattner at apple.com>:
>>
>> On Oct 26, 2009, at 3:51 PM, Edward O'Callaghan wrote:
>>
>>> Author: evocallaghan
>>> Date: Mon Oct 26 17:51:02 2009
>>> New Revision: 85170
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=85170&view=rev
>>> Log:
>>> Convert a few tests to FileCheck for PR5307.
>>
>> nice, thanks for doing this Edward!  Note that these preprocessor  
>> tests are
>> whitespace sensitive.  Please pass -strict-whitespace to FileCheck  
>> so that
>> it doesn't ignore whitespace differences.
>>
>> -Chris
>>
>>>
>>> Modified:
>>>   cfe/trunk/test/Preprocessor/c99-6_10_3_3_p4.c
>>>   cfe/trunk/test/Preprocessor/macro_disable3.c
>>>   cfe/trunk/test/Preprocessor/macro_rparen_scan2.c
>>>
>>> Modified: cfe/trunk/test/Preprocessor/c99-6_10_3_3_p4.c
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/c99-6_10_3_3_p4.c?rev=85170&r1=85169&r2=85170&view=diff
>>>
>>>
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> ====================================================================
>>> --- cfe/trunk/test/Preprocessor/c99-6_10_3_3_p4.c (original)
>>> +++ cfe/trunk/test/Preprocessor/c99-6_10_3_3_p4.c Mon Oct 26  
>>> 17:51:02 2009
>>> @@ -1,6 +1,9 @@
>>> -// RUN: clang-cc -E %s | grep -F 'char p[] = "x ## y";'
>>> +// RUN: clang-cc -E %s | FileCheck %s
>>> #define hash_hash # ## #
>>> #define mkstr(a) # a
>>> #define in_between(a) mkstr(a)
>>> #define join(c, d) in_between(c hash_hash d)
>>> char p[] = join(x, y);
>>> +
>>> +// CHECK: char p[] = "x ## y";
>>> +
>>>
>>> Modified: cfe/trunk/test/Preprocessor/macro_disable3.c
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro_disable3.c?rev=85170&r1=85169&r2=85170&view=diff
>>>
>>>
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> ====================================================================
>>> --- cfe/trunk/test/Preprocessor/macro_disable3.c (original)
>>> +++ cfe/trunk/test/Preprocessor/macro_disable3.c Mon Oct 26  
>>> 17:51:02 2009
>>> @@ -1,4 +1,4 @@
>>> -// RUN: clang-cc %s -E | grep -F 'f(2 * (f(2 * (z[0]))));'
>>> +// RUN: clang-cc %s -E | FileCheck %s
>>> // Check for C99 6.10.3.4p2.
>>>
>>> #define f(a) f(x * (a))
>>> @@ -6,3 +6,5 @@
>>> #define z z[0]
>>> f(f(z));
>>>
>>> +// CHECK: f(2 * (f(2 * (z[0]))));
>>> +
>>>
>>> Modified: cfe/trunk/test/Preprocessor/macro_rparen_scan2.c
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro_rparen_scan2.c?rev=85170&r1=85169&r2=85170&view=diff
>>>
>>>
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> ====================================================================
>>> --- cfe/trunk/test/Preprocessor/macro_rparen_scan2.c (original)
>>> +++ cfe/trunk/test/Preprocessor/macro_rparen_scan2.c Mon Oct 26  
>>> 17:51:02
>>> 2009
>>> @@ -1,4 +1,4 @@
>>> -// RUN: clang-cc -E %s | grep -F 'static int glob = (1 + 1 );'
>>> +// RUN: clang-cc -E %s | FileCheck %s
>>>
>>> #define R_PAREN )
>>>
>>> @@ -6,3 +6,5 @@
>>>
>>> static int glob = (1 + FUNC(1 R_PAREN );
>>>
>>> +// CHECK: static int glob = (1 + 1 );
>>> +
>>>
>>>
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>>
>
>
>
> -- 
> -- 
> Edward O'Callaghan
> http://www.auroraux.org/
> eocallaghan at auroraux dot org
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list