FileCheck-ify some clang grep tests that use double quotes

The escaping interaction between Python and grep doesn't work on my
system.  This change fixes the tests for me.

llvm-svn: 179214
This commit is contained in:
Reid Kleckner 2013-04-10 21:10:39 +00:00
parent 04b6e80381
commit e494399203
7 changed files with 33 additions and 23 deletions

View File

@ -1,4 +1,6 @@
// RUN: %clang_cc1 %s -emit-llvm -g -o - | grep DW_TAG_pointer_type | grep -v {"char"}
// RUN: %clang_cc1 %s -emit-llvm -g -o - | FileCheck %s
// CHECK: DW_TAG_pointer_type
// CHECK-NOT: {"char"}
char i = 1;
void foo() {

View File

@ -1,12 +1,14 @@
// RUN: %clang_cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s
// RUN: grep -e "\^i" %t | count 1
// RUN: grep -e "\[0i\]" %t | count 1
// RUN: %clang_cc1 -triple=i686-apple-darwin9 -emit-llvm -o - %s | FileCheck %s
int main() {
int n;
const char * inc = @encode(int[]);
// CHECK: ^i
// CHECK-NOT: ^i
const char * vla = @encode(int[n]);
// CHECK: [0i]
// CHECK-NOT: [0i]
}
// PR3648

View File

@ -1,14 +1,14 @@
// 32-bit
// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o %t %s
// RUN: grep '@"\\01L_OBJC_CATEGORY_A_Cat" = internal global .*, section "__OBJC,__category,regular,no_dead_strip", align 4' %t
// RUN: grep '@"\\01L_OBJC_CLASS_A" = internal global .*, section "__OBJC,__class,regular,no_dead_strip", align 4' %t
// RUN: grep '@"\\01L_OBJC_CLASS_C" = internal global .*, section "__OBJC,__class,regular,no_dead_strip", align 4' %t
// RUN: grep '@"\\01L_OBJC_CLASS_PROTOCOLS_C" = internal global .*, section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4' %t
// RUN: grep '@"\\01L_OBJC_METACLASS_A" = internal global .*, section "__OBJC,__meta_class,regular,no_dead_strip", align 4' %t
// RUN: grep '@"\\01L_OBJC_METACLASS_C" = internal global .*, section "__OBJC,__meta_class,regular,no_dead_strip", align 4' %t
// RUN: grep '@"\\01L_OBJC_MODULES" = internal global .*, section "__OBJC,__module_info,regular,no_dead_strip", align 4' %t
// RUN: grep '@"\\01L_OBJC_PROTOCOL_P" = internal global .*, section "__OBJC,__protocol,regular,no_dead_strip", align 4' %t
// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s | FileCheck %s
// CHECK: @"\01L_OBJC_METACLASS_A" = internal global {{.*}}, section "__OBJC,__meta_class,regular,no_dead_strip", align 4
// CHECK: @"\01L_OBJC_CLASS_A" = internal global {{.*}}, section "__OBJC,__class,regular,no_dead_strip", align 4
// CHECK: @"\01L_OBJC_CATEGORY_A_Cat" = internal global {{.*}}, section "__OBJC,__category,regular,no_dead_strip", align 4
// CHECK: @"\01L_OBJC_PROTOCOL_P" = internal global {{.*}}, section "__OBJC,__protocol,regular,no_dead_strip", align 4
// CHECK: @"\01L_OBJC_CLASS_PROTOCOLS_C" = internal global {{.*}}, section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
// CHECK: @"\01L_OBJC_METACLASS_C" = internal global {{.*}}, section "__OBJC,__meta_class,regular,no_dead_strip", align 4
// CHECK: @"\01L_OBJC_CLASS_C" = internal global {{.*}}, section "__OBJC,__class,regular,no_dead_strip", align 4
// CHECK: @"\01L_OBJC_MODULES" = internal global {{.*}}, section "__OBJC,__module_info,regular,no_dead_strip", align 4
// 64-bit

View File

@ -1,5 +1,4 @@
// RUN: %clang_cc1 -emit-llvm -o %t %s
// RUN: grep '@"OBJC_IVAR_$_XCOrganizerDeviceNodeInfo.viewController"' %t
// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
// PR13820
// REQUIRES: LP64
@ -17,5 +16,6 @@
@implementation XCOrganizerDeviceNodeInfo
@synthesize viewController;
// CHECK: @"OBJC_IVAR_$_XCOrganizerDeviceNodeInfo.viewController"
@end

View File

@ -1,4 +1,5 @@
// Verify that -include isn't included twice with -save-temps.
// RUN: %clang -S -o - %s -include %t.h -save-temps -### 2> %t.log
// RUN: grep '"-include' %t.log | count 1
// RUN: FileCheck %s < %t.log
// CHECK: "-include
// CHECK-NOT: "-include

View File

@ -1,17 +1,21 @@
// RUN: %clang_cc1 -verify -rewrite-macros -o %t %s
// RUN: %clang_cc1 %s -verify -rewrite-macros -o %t
// RUN: FileCheck %s < %t
// Any CHECK line comments are included in the output, so we use some extra
// regex brackets to make sure we don't match the CHECK lines themselves.
#define A(a,b) a ## b
// RUN: grep '12 */\*A\*/ /\*(1,2)\*/' %t
// CHECK: 12{{ *}}/*A*/ /*(1,2)*/
A(1,2)
// RUN: grep '/\*_Pragma("mark")\*/' %t
// CHECK: /*_Pragma("{{mark}}")*/
_Pragma("mark")
// RUN: grep "//#warning eek" %t
// CHECK: /*#warning {{eek}}*/
/* expected-warning {{eek}} */ #warning eek
// RUN: grep "//#pragma mark mark" %t
// CHECK: //#pragma mark {{mark}}
#pragma mark mark

View File

@ -1,4 +1,4 @@
// RUN: %clang_cc1 -E %s | grep 'a: "and"'
// RUN: %clang_cc1 -E %s | FileCheck %s
#define X(A) #A
@ -8,4 +8,5 @@
//
// This should be spelled as 'and', not '&&'
a: X(and)
// CHECK: a: "and"