forked from OSchip/llvm-project
Multiple tests in a single test file must be linked with '&&'.
Otherwise, failing tests other than the last one will not be reported. llvm-svn: 52231
This commit is contained in:
parent
616e484be4
commit
351763e156
clang/test
|
@ -1,5 +1,5 @@
|
|||
// RUN: clang -emit-llvm < %s 2>&1 | grep '@foo.*global.*addrspace(1)'
|
||||
// RUN: clang -emit-llvm < %s 2>&1 | grep '@ban.*global.*addrspace(1)'
|
||||
// RUN: clang -emit-llvm < %s 2>&1 | grep '@foo.*global.*addrspace(1)' &&
|
||||
// RUN: clang -emit-llvm < %s 2>&1 | grep '@ban.*global.*addrspace(1)' &&
|
||||
// RUN: clang -emit-llvm < %s 2>&1 | grep 'load.*addrspace(1)' | count 2
|
||||
int foo __attribute__((address_space(1)));
|
||||
int ban[10] __attribute__((address_space(1)));
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
// RUN: clang %s -emit-llvm -o - > %t1
|
||||
// RUN: grep @llvm.atomic.las.i32 %t1
|
||||
// RUN: grep @llvm.atomic.lss.i32 %t1
|
||||
// RUN: grep @llvm.atomic.load.min.i32 %t1
|
||||
// RUN: grep @llvm.atomic.load.max.i32 %t1
|
||||
// RUN: grep @llvm.atomic.load.umin.i32 %t1
|
||||
// RUN: grep @llvm.atomic.load.umax.i32 %t1
|
||||
// RUN: grep @llvm.atomic.swap.i32 %t1
|
||||
// RUN: grep @llvm.atomic.lcs.i32 %t1
|
||||
// RUN: grep @llvm.atomic.load.and.i32 %t1
|
||||
// RUN: grep @llvm.atomic.load.or.i32 %t1
|
||||
// RUN: clang %s -emit-llvm -o - > %t1 &&
|
||||
// RUN: grep @llvm.atomic.las.i32 %t1 &&
|
||||
// RUN: grep @llvm.atomic.lss.i32 %t1 &&
|
||||
// RUN: grep @llvm.atomic.load.min.i32 %t1 &&
|
||||
// RUN: grep @llvm.atomic.load.max.i32 %t1 &&
|
||||
// RUN: grep @llvm.atomic.load.umin.i32 %t1 &&
|
||||
// RUN: grep @llvm.atomic.load.umax.i32 %t1 &&
|
||||
// RUN: grep @llvm.atomic.swap.i32 %t1 &&
|
||||
// RUN: grep @llvm.atomic.lcs.i32 %t1 &&
|
||||
// RUN: grep @llvm.atomic.load.and.i32 %t1 &&
|
||||
// RUN: grep @llvm.atomic.load.or.i32 %t1 &&
|
||||
// RUN: grep @llvm.atomic.load.xor.i32 %t1
|
||||
|
||||
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
// RUN: clang -emit-llvm < %s | grep 't1.*noreturn'
|
||||
// RUN: clang -emit-llvm < %s | grep 't1.*noreturn' &&
|
||||
void t1() __attribute__((noreturn));
|
||||
void t1() {}
|
||||
|
||||
// RUN: clang -emit-llvm < %s | grep 't2.*nounwind'
|
||||
// RUN: clang -emit-llvm < %s | grep 't2.*nounwind' &&
|
||||
void t2() __attribute__((nothrow));
|
||||
void t2() {}
|
||||
|
||||
// RUN: clang -emit-llvm < %s | grep 'weak.*t3'
|
||||
// RUN: clang -emit-llvm < %s | grep 'weak.*t3' &&
|
||||
void t3() __attribute__((weak));
|
||||
void t3() {}
|
||||
|
||||
// RUN: clang -emit-llvm < %s | grep 'hidden.*t4'
|
||||
// RUN: clang -emit-llvm < %s | grep 'hidden.*t4' &&
|
||||
void t4() __attribute__((visibility("hidden")));
|
||||
void t4() {}
|
||||
|
||||
// RUN: clang -emit-llvm < %s | grep 't5.*weak'
|
||||
// RUN: clang -emit-llvm < %s | grep 't5.*weak' &&
|
||||
int t5 __attribute__((weak)) = 2;
|
||||
|
||||
// RUN: clang -emit-llvm < %s | grep 't6.*protected'
|
||||
// RUN: clang -emit-llvm < %s | grep 't6.*protected' &&
|
||||
int t6 __attribute__((visibility("protected")));
|
||||
|
||||
// RUN: clang -emit-llvm < %s | grep 't7.*noreturn'
|
||||
// RUN: clang -emit-llvm < %s | grep 't7.*nounwind'
|
||||
// RUN: clang -emit-llvm < %s | grep 't7.*noreturn' &&
|
||||
// RUN: clang -emit-llvm < %s | grep 't7.*nounwind' &&
|
||||
void t7() __attribute__((noreturn, nothrow));
|
||||
void t7() {}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: clang -emit-llvm %s -o - | grep 'cttz' | count 2
|
||||
// RUN: clang -emit-llvm %s -o - | grep 'cttz' | count 2 &&
|
||||
// RUN: clang -emit-llvm %s -o - | grep 'ctlz' | count 2
|
||||
|
||||
int a(int a) {return __builtin_ctz(a) + __builtin_clz(a);}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: clang -emit-llvm < %s | grep "llvm.returnaddress"
|
||||
// RUN: clang -emit-llvm < %s | grep "llvm.returnaddress" &&
|
||||
// RUN: clang -emit-llvm < %s | grep "llvm.frameaddress"
|
||||
void* a(unsigned x) {
|
||||
return __builtin_return_address(0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: clang -emit-llvm %s -o - 2>&1 | not grep warning
|
||||
// RUN: clang -emit-llvm %s -o - 2>&1 | not grep warning &&
|
||||
// RUN: clang -emit-llvm %s -o - | grep @b | count 1
|
||||
|
||||
int a, b;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: clang -emit-llvm %s -o - | not grep "[5 x i8]"
|
||||
// RUN: clang -emit-llvm %s -o - | not grep "[5 x i8]" &&
|
||||
// RUN: clang -emit-llvm %s -o - | not grep "store"
|
||||
|
||||
void test(void) {
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
// RUN: grep "STestB1 = type <{ i8, i8 }>" %t1 &&
|
||||
// RUN: grep "STestB2 = type <{ i8, i8, i8 }>" %t1 &&
|
||||
// RUN: grep "STestB3 = type <{ i8, i8 }>" %t1 &&
|
||||
// RUN: grep "STestB4 = type <{ i8, i8, i8, i8 }>" %t1
|
||||
// RUN: grep "STestB5 = type <{ i8, i8, i8, i8, i8, i8 }>" %t1
|
||||
// RUN: grep "STestB4 = type <{ i8, i8, i8, i8 }>" %t1 &&
|
||||
// RUN: grep "STestB5 = type <{ i8, i8, i8, i8, i8, i8 }>" %t1 &&
|
||||
// RUN: grep "STestB6 = type <{ i8, i8, i8, i8 }>" %t1
|
||||
// Test struct layout for x86-darwin target
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// RUN: clang %s -triple=i686-pc-linux-gnu -emit-llvm -o - > %t1
|
||||
// RUN: grep "ax" %t1
|
||||
// RUN: grep "bx" %t1
|
||||
// RUN: grep "cx" %t1
|
||||
// RUN: grep "dx" %t1
|
||||
// RUN: grep "di" %t1
|
||||
// RUN: grep "si" %t1
|
||||
// RUN: grep "st" %t1
|
||||
// RUN: grep "ax" %t1 &&
|
||||
// RUN: grep "bx" %t1 &&
|
||||
// RUN: grep "cx" %t1 &&
|
||||
// RUN: grep "dx" %t1 &&
|
||||
// RUN: grep "di" %t1 &&
|
||||
// RUN: grep "si" %t1 &&
|
||||
// RUN: grep "st" %t1 &&
|
||||
// RUN: grep "st(1)" %t1
|
||||
|
||||
void f() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: clang %s -emit-llvm -o - | grep 0x3BFD83C940000000 | count 2
|
||||
// RUN: clang %s -emit-llvm -o - | grep 0x3BFD83C940000000 | count 2 &&
|
||||
// RUN: clang %s -emit-llvm -o - | grep 2.000000e+32 | count 2
|
||||
|
||||
float F = 1e-19f;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: not clang %s -std=c90
|
||||
// RUN: not clang %s -std=c90 &&
|
||||
// RUN: clang %s -std=c99
|
||||
|
||||
int f (int z) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: clang -fsyntax-only -fno-caret-diagnostics -pedantic %s 2>&1 | grep warning | wc -l | grep 1
|
||||
// RUN: clang -fsyntax-only -fno-caret-diagnostics -pedantic %s 2>&1 | grep warning | wc -l | grep 1 &&
|
||||
// RUN: clang -fsyntax-only -verify -pedantic %s
|
||||
|
||||
char (((( /* expected-error {{to match this '('}} */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Comma is not allowed in C89
|
||||
// RUN: not clang -E %s -std=c89 -pedantic-errors
|
||||
// RUN: not clang -E %s -std=c89 -pedantic-errors &&
|
||||
|
||||
// Comma is allowed if unevaluated in C99
|
||||
// RUN: clang -E %s -std=c99 -pedantic-errors
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: not clang -E %s 2>&1 | grep 'invalid token at start of a preprocessor expression'
|
||||
// RUN: not clang -E %s 2>&1 | grep 'token is not a valid binary operator in a preprocessor subexpression'
|
||||
// RUN: not clang -E %s 2>&1 | grep 'invalid token at start of a preprocessor expression' &&
|
||||
// RUN: not clang -E %s 2>&1 | grep 'token is not a valid binary operator in a preprocessor subexpression' &&
|
||||
// RUN: not clang -E %s 2>&1 | grep ':14: error: expected end of line in preprocessor expression'
|
||||
// PR2220
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: clang -E %s | grep '^a: x$' &&
|
||||
// RUN: clang -E %s | grep '^b: x y, z,h$'
|
||||
// RUN: clang -E %s | grep '^b: x y, z,h$' &&
|
||||
// RUN: clang -E %s | grep '^c: foo(x)$'
|
||||
|
||||
#define A(b, c...) b c
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// RUN: clang %s -E | grep 'V);' &&
|
||||
// RUN: clang %s -E | grep 'W, 1, 2);'
|
||||
// RUN: clang %s -E | grep 'X, 1, 2);'
|
||||
// RUN: clang %s -E | grep 'Y, );'
|
||||
// RUN: clang %s -E | grep 'W, 1, 2);' &&
|
||||
// RUN: clang %s -E | grep 'X, 1, 2);' &&
|
||||
// RUN: clang %s -E | grep 'Y, );' &&
|
||||
// RUN: clang %s -E | grep 'Z, );'
|
||||
|
||||
#define debug(format, ...) format, ## __VA_ARGS__)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: clang -E %s | grep '+ + - - + + = = =' &&
|
||||
// RUN: clang -E %s | not grep -F '...'
|
||||
// RUN: clang -E %s | not grep -F '...' &&
|
||||
// RUN: clang -E %s | not grep -F 'L"str"'
|
||||
|
||||
// This should print as ".. ." to avoid turning into ...
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* RUN: clang -E %s | grep 'a 3'
|
||||
* RUN: clang -E %s | grep 'b 14'
|
||||
* RUN: clang -E -P %s | grep 'a 3'
|
||||
/* RUN: clang -E %s | grep 'a 3' &&
|
||||
* RUN: clang -E %s | grep 'b 14' &&
|
||||
* RUN: clang -E -P %s | grep 'a 3' &&
|
||||
* RUN: clang -E -P %s | grep 'b 14'
|
||||
* PR1848
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: clang -rewrite-objc %s -o -
|
||||
// RUN: clang -rewrite-objc %s -o - &&
|
||||
// RUN: clang -rewrite-objc %s -o - | grep 'newInv->_container'
|
||||
|
||||
@interface NSMutableArray
|
||||
|
|
Loading…
Reference in New Issue