]> granicus.if.org Git - clang/commitdiff
Replace 'grep foo | count 0' with 'not grep foo'.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 4 Jul 2013 15:22:16 +0000 (15:22 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 4 Jul 2013 15:22:16 +0000 (15:22 +0000)
This avoids depending on pipefail not being used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185648 91177308-0d34-0410-b5e6-96231b3b80d8

18 files changed:
test/Analysis/html-diags-multifile.c
test/CodeGen/2008-07-31-asm-labels.c
test/CodeGen/PR3589-freestanding-libcalls.c
test/CodeGen/bitfield-assign.c
test/CodeGenCXX/copy-assign-synthesis.cpp
test/CodeGenCXX/copy-constructor-elim.cpp
test/CodeGenCXX/implicit-instantiation-1.cpp
test/CodeGenObjC/bitfield-ivar-offsets.m
test/CodeGenObjC/blocks-1.m
test/CodeGenObjC/objc2-no-write-barrier.m
test/CodeGenObjC/objc2-write-barrier-5.m
test/CodeGenObjC/protocols-lazy.m
test/Driver/Xarch.c
test/Driver/darwin-dsymutil.c
test/Driver/darwin-verify-debug.c
test/Driver/m_and_mm.c
test/Frontend/darwin-version.c
test/PCH/external-defs.c

index 6e89faefc5bd7216c3bee89856ec23194bdc1bb9..e84cc3405a9db88a6dfa3d2f8255ead1dc844765 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: mkdir -p %t.dir
 // RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %t.dir
-// RUN: ls %t.dir | grep report | count 0
+// RUN: ls %t.dir | not grep report
 // RUN: rm -fR %t.dir
 
 // This tests that we do not currently emit HTML diagnostics for reports that
index 130ad6ba46cce7ee31d6488a51db6baf5f08714c..733742bd85ed46d771d5b04ff747c7819abe5773 100644 (file)
@@ -1,10 +1,10 @@
 // RUN: %clang_cc1 -emit-llvm -o %t %s
-// RUN: grep "@pipe()" %t | count 0
+// RUN: not grep "@pipe()" %t
 // RUN: grep '_thisIsNotAPipe' %t | count 3
-// RUN: grep 'g0' %t | count 0
+// RUN: not grep 'g0' %t
 // RUN: grep '_renamed' %t | count 2
 // RUN: %clang_cc1 -DUSE_DEF -emit-llvm -o %t %s
-// RUN: grep "@pipe()" %t | count 0
+// RUN: not grep "@pipe()" %t
 // RUN: grep '_thisIsNotAPipe' %t | count 3
 // <rdr://6116729>
 
index 40e5fb11214b3d64146fcb1345879caea3b028ec..5216e820411ab2f3616c686579876e50dc17ff85 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o - | grep 'declare i32 @printf' | count 1
 // RUN: %clang_cc1 -triple i386-unknown-unknown -O2 -emit-llvm %s -o - | grep 'declare i32 @puts' | count 1
-// RUN: %clang_cc1 -triple i386-unknown-unknown -ffreestanding -O2 -emit-llvm %s -o - | grep 'declare i32 @puts' | count 0
+// RUN: %clang_cc1 -triple i386-unknown-unknown -ffreestanding -O2 -emit-llvm %s -o - | not grep 'declare i32 @puts'
 
 int printf(const char *, ...);
 
index b8ab61339cf696dcbb1357b2a960e4dbee5ac8fa..058f5ed63d380de9c18b8e95d83d65713448d199 100644 (file)
@@ -10,8 +10,8 @@
 
 // Check that we got the right value.
 // RUN: %clang_cc1 -triple i386-unknown-unknown -O3 -emit-llvm -o %t %s
-// RUN: grep 'load ' %t | count 0
-// RUN: grep "@g0" %t | count 0
+// RUN: not grep 'load ' %t
+// RUN: not grep "@g0" %t
 
 struct s0 {
   int f0 : 2;
index e9fc0c337c1050b768947762f71ebda5283a740f..9c8ae8879540e7050d41ffefeb060c6f9fdd60dd 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -emit-llvm -o %t %s
-// RUN: grep "_ZN1XaSERK1X" %t | count 0
+// RUN: not grep "_ZN1XaSERK1X" %t
 
 extern "C" int printf(...);
 
index c883584fe02f3f5393fa3c47f3562cc4656b3c24..ad3a87b9d5f88c090231d6d312add7363e73daef 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -emit-llvm -o %t %s
-// RUN: grep "_ZN1CC1ERK1C" %t | count 0
-// RUN: grep "_ZN1SC1ERK1S" %t | count 0
+// RUN: not grep "_ZN1CC1ERK1C" %t
+// RUN: not grep "_ZN1SC1ERK1S" %t
 
 extern "C" int printf(...);
 
index 0c826e4b20d12b0a4ccedebcdaad92e3de5cac6f..bf6a14150892a648d47358e4fbd8ec11b802ca87 100644 (file)
@@ -20,7 +20,7 @@ void foo(X<int> &xi, X<float> *xfp, int i, float f) {
   // RUN: grep "linkonce_odr.*_ZN1XIfE1fEf" %t | count 1
   xfp->f(f);
   
-  // RUN: grep "linkonce_odr.*_ZN1XIfE1hEf" %t | count 0
+  // RUN: not grep "linkonce_odr.*_ZN1XIfE1hEf" %t
   
 }
 
index 7a07f27d2653550aa3a1a78b69dc062448eb92e2..f17d56af19ce38f512ff9b6a761ceb879bc56b77 100644 (file)
@@ -6,7 +6,7 @@
 // RUN: grep -F '@"OBJC_IVAR_$_I0._b3" = global i64 4, section "__DATA, __objc_ivar", align 8' %t
 // RUN: grep -F '@"OBJC_IVAR_$_I0._y" = global i64 6, section "__DATA, __objc_ivar", align 8' %t
 // RUN: grep -F '@"OBJC_IVAR_$_I0._b4" = global i64 7, section "__DATA, __objc_ivar", align 8' %t
-// RUN: grep -F '@"OBJC_IVAR_$_I0." = global' %t | count 0
+// RUN: not grep -F '@"OBJC_IVAR_$_I0." = global' %t
 
 @interface I0 {
   unsigned _b0:4;
index 99a11f91e4cdcf98b0509b354f94e4d0e9b52284..0d2c35096ae4201f04ad09a66a500350411560d0 100644 (file)
@@ -4,7 +4,7 @@
 // RUN: grep "__destroy_helper_block_" %t | count 4
 // RUN: grep "__Block_byref_object_copy_" %t | count 2
 // RUN: grep "__Block_byref_object_dispose_" %t | count 2
-// RUN: grep "i32 135)" %t | count 0
+// RUN: not grep "i32 135)" %t
 // RUN: grep "_Block_object_assign" %t | count 4
 // RUN: grep "objc_read_weak" %t | count 2
 // RUN: grep "objc_assign_weak" %t | count 3
@@ -14,7 +14,7 @@
 // RUN: grep "__destroy_helper_block_" %t | count 4
 // RUN: grep "__Block_byref_object_copy_" %t | count 2
 // RUN: grep "__Block_byref_object_dispose_" %t | count 2
-// RUN: grep "i32 135)" %t | count 0
+// RUN: not grep "i32 135)" %t
 // RUN: grep "_Block_object_assign" %t | count 4
 // RUN: grep "objc_read_weak" %t | count 2
 // RUN: grep "objc_assign_weak" %t | count 3
index ece6b9d582b7d0122cbf2997da91c491d200a689..16593f128d785ffdc68a96493368438dd128a2ea 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s
-// RUN: grep 'objc_assign' %t | count 0
+// RUN: not grep 'objc_assign' %t
 // RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s
-// RUN: grep 'objc_assign' %t | count 0
+// RUN: not grep 'objc_assign' %t
 
 typedef struct {
     int ival;
index 65a71a5a1d354f7223c151948669c1a54f9ac36d..44af818a320e1c842dd2ac42c649aabec388fa80 100644 (file)
@@ -1,8 +1,8 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s
-// RUN: grep objc_assign_ivar %t | count 0
+// RUN: not grep objc_assign_ivar %t
 // RUN: grep objc_assign_strongCast %t | count 8
 // RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s
-// RUN: grep objc_assign_ivar %t | count 0
+// RUN: not grep objc_assign_ivar %t
 // RUN: grep objc_assign_strongCast %t | count 8
 
 @interface TestUnarchiver 
index 642f886a088be5daf325c4ecc118f9b3f7d42a39..fba7454b95498a3b77be31e0163ec03ad7db7061 100644 (file)
@@ -1,11 +1,11 @@
 // RUN: %clang_cc1 -emit-llvm -triple i686-apple-darwin8 -fobjc-runtime=macosx-fragile-10.5 -o %t %s
 
 // No object generated
-// RUN: grep OBJC_PROTOCOL_P0 %t | count 0
+// RUN: not grep OBJC_PROTOCOL_P0 %t
 @protocol P0;
 
 // No object generated
-// RUN: grep OBJC_PROTOCOL_P1 %t | count 0
+// RUN: not grep OBJC_PROTOCOL_P1 %t
 @protocol P1 -im1; @end
 
 // Definition triggered by protocol reference.
@@ -16,7 +16,7 @@ void f0() { id x = @protocol(P2); }
 
 // Forward definition triggered by protocol reference.
 // RUN: grep OBJC_PROTOCOL_P3 %t | count 3
-// RUN: grep OBJC_PROTOCOL_INSTANCE_METHODS_P3 %t | count 0
+// RUN: not grep OBJC_PROTOCOL_INSTANCE_METHODS_P3 %t
 @protocol P3;
 void f1() { id x = @protocol(P3); }
 
index 2523f5acac0107b53e72c61055a54b6415f7a13f..34f9340dd68f59aa4d688c57b4e4be4fafdeb3db 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: %clang -target i386-apple-darwin9 -m32 -Xarch_i386 -O2 %s -S -### 2> %t.log
 // RUN: grep ' "-O2" ' %t.log | count 1
 // RUN: %clang -target i386-apple-darwin9 -m64 -Xarch_i386 -O2 %s -S -### 2> %t.log
-// RUN: grep ' "-O2" ' %t.log | count 0
+// RUN: not grep ' "-O2" ' %t.log
 // RUN: grep "argument unused during compilation: '-Xarch_i386 -O2'" %t.log
 // RUN: not %clang -target i386-apple-darwin9 -m32 -Xarch_i386 -o -Xarch_i386 -S %s -S -Xarch_i386 -o 2> %t.log
 // RUN: grep "error: invalid Xarch argument: '-Xarch_i386 -o'" %t.log | count 2
index 440986639a0a822c49619c7c9a5eb9bbe4ae5f29..b8c3083c93536dab138aa63a7146349023302486 100644 (file)
@@ -35,7 +35,7 @@
 // RUN: touch %t.o
 // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
 // RUN:   -o foo %t.o -g 2> %t
-// RUN: grep "Dsymutil" %t | count 0
+// RUN: not grep "Dsymutil" %t
 
 // Check that we put the .dSYM in the right place.
 // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
index 677419a20c5b514f907210a52acfe651c8ce905f..c419cef589d1b44bd2942e8ce658fd675a55ed1c 100644 (file)
@@ -31,4 +31,4 @@
 // RUN: touch %t.o
 // RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
 // RUN:   -verify -o foo %t.o -g 2> %t
-// RUN: grep "Verify" %t | count 0
+// RUN: not grep "Verify" %t
index eab2a04986a94f8c8e644fe471fe233b83021470..18cf7abfa629de41e29eb05648ce47740df3f17d 100644 (file)
@@ -1,3 +1,3 @@
 // RUN: %clang -### \
 // RUN:   -M -MM %s 2> %t
-// RUN: grep '"-sys-header-deps"' %t | count 0
+// RUN: not grep '"-sys-header-deps"' %t
index f9ce54b923d37ae1c54a59d9ead57995fba4992b..7234ab48e3b0721f7f2251f481202c71910c6d9b 100644 (file)
@@ -1,23 +1,23 @@
 // RUN: %clang -target armv6-apple-darwin9 -dM -E -o %t %s
-// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | count 0
+// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1050' | count 1
 // RUN: %clang -target armv6-apple-darwin9 -miphoneos-version-min=3.0 -dM -E -o %t %s
 // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '30000' | count 1
-// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | count 0
+// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
 // RUN: %clang -target armv6-apple-darwin9 -miphoneos-version-min=2.0 -dM -E -o %t %s
 // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20000' | count 1
-// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | count 0
+// RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
 // RUN: %clang -target armv6-apple-darwin9 -miphoneos-version-min=2.2 -dM -E -o %t %s
 // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20200' | count 1
 // RUN: %clang -target i686-apple-darwin8 -dM -E -o %t %s
-// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | count 0
+// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1040' | count 1
 // RUN: %clang -target i686-apple-darwin9 -dM -E -o %t %s
 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1050' | count 1
 // RUN: %clang -target i686-apple-darwin10 -dM -E -o %t %s
 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1060' | count 1
 // RUN: %clang -target i686-apple-darwin9 -mmacosx-version-min=10.4 -dM -E -o %t %s
-// RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | count 0
+// RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1040' | count 1
 // RUN: %clang -target i686-apple-darwin9 -mmacosx-version-min=10.5 -dM -E -o %t %s
 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1050' | count 1
index 5097859297a58a79c62ff2051113aa7c1f4c72d1..5c2582a9c361f59fd3b46c61173275bfbbc25a9a 100644 (file)
@@ -3,7 +3,7 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -include-pch %t.pch -emit-llvm -o %t %s
 
 // RUN: grep "@x = common global i32 0" %t | count 1
-// RUN: grep "@z" %t | count 0
+// RUN: not grep "@z" %t
 
 // RUN: grep "@x2 = global i32 19" %t | count 1
 int x2 = 19;