Add 'not' to commands that are expected to fail.

This is at least good documentation, but also opens the possibility of
using pipefail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185652 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Frontend/ir-support-errors.ll b/test/Frontend/ir-support-errors.ll
index cb5913c..daf1675 100644
--- a/test/Frontend/ir-support-errors.ll
+++ b/test/Frontend/ir-support-errors.ll
@@ -1,4 +1,4 @@
-; RUN: %clang_cc1 -S -o - %s 2>&1 | FileCheck %s
+; RUN: not %clang_cc1 -S -o - %s 2>&1 | FileCheck %s
 
 target triple = "x86_64-apple-darwin10"
 
diff --git a/test/Frontend/rewrite-includes-invalid-hasinclude.c b/test/Frontend/rewrite-includes-invalid-hasinclude.c
index e32d6ad..334519a 100644
--- a/test/Frontend/rewrite-includes-invalid-hasinclude.c
+++ b/test/Frontend/rewrite-includes-invalid-hasinclude.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -E -frewrite-includes -DFIRST -I %S/Inputs %s -o - | FileCheck -strict-whitespace %s
+// RUN: not %clang_cc1 -E -frewrite-includes -DFIRST -I %S/Inputs %s -o - | FileCheck -strict-whitespace %s
 
 #if __has_include bar.h
 #endif
diff --git a/test/Frontend/rewrite-includes.c b/test/Frontend/rewrite-includes.c
index bf330a6..1746e15 100644
--- a/test/Frontend/rewrite-includes.c
+++ b/test/Frontend/rewrite-includes.c
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -verify -E -frewrite-includes -DFIRST -I %S/Inputs %s -o - | FileCheck -strict-whitespace %s
-// RUN: %clang_cc1 -verify -E -frewrite-includes -P -DFIRST -I %S/Inputs %s -o - | FileCheck -check-prefix=CHECKNL -strict-whitespace %s
+// RUN: not %clang_cc1 -verify -E -frewrite-includes -DFIRST -I %S/Inputs %s -o - | FileCheck -strict-whitespace %s
+// RUN: not %clang_cc1 -verify -E -frewrite-includes -P -DFIRST -I %S/Inputs %s -o - | FileCheck -check-prefix=CHECKNL -strict-whitespace %s
 // STARTCOMPARE
 #define A(a,b) a ## b
 A(1,2)
diff --git a/test/Frontend/verify-fatal.c b/test/Frontend/verify-fatal.c
index 0e74032..1a26196 100644
--- a/test/Frontend/verify-fatal.c
+++ b/test/Frontend/verify-fatal.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wfatal-errors -verify %s 2>&1 | FileCheck %s
+// RUN: not %clang_cc1 -Wfatal-errors -verify %s 2>&1 | FileCheck %s
 
 #error first fatal
 // expected-error@-1 {{first fatal}}
diff --git a/test/Frontend/verify.c b/test/Frontend/verify.c
index 3d71e04..20bc90d 100644
--- a/test/Frontend/verify.c
+++ b/test/Frontend/verify.c
@@ -1,8 +1,8 @@
 // RUN: %clang_cc1 -DTEST1 -verify %s
-// RUN: %clang_cc1 -DTEST2 -verify %s 2>&1 | FileCheck -check-prefix=CHECK2 %s
-// RUN: %clang_cc1 -DTEST3 -verify %s 2>&1 | FileCheck -check-prefix=CHECK3 %s
-// RUN: %clang_cc1 -DTEST4 -verify %s 2>&1 | FileCheck -check-prefix=CHECK4 %s
-// RUN: %clang_cc1 -DTEST5 -verify %s 2>&1 | FileCheck -check-prefix=CHECK5 %s
+// RUN: not %clang_cc1 -DTEST2 -verify %s 2>&1 | FileCheck -check-prefix=CHECK2 %s
+// RUN: not %clang_cc1 -DTEST3 -verify %s 2>&1 | FileCheck -check-prefix=CHECK3 %s
+// RUN: not %clang_cc1 -DTEST4 -verify %s 2>&1 | FileCheck -check-prefix=CHECK4 %s
+// RUN: not %clang_cc1 -DTEST5 -verify %s 2>&1 | FileCheck -check-prefix=CHECK5 %s
 
 // expected-warning@ malformed
 // expected-error@7 1 {{missing or invalid line number}}
@@ -109,14 +109,14 @@
 #endif
 
 #if 0
-// RUN: %clang_cc1 -verify %t.invalid 2>&1 | FileCheck -check-prefix=CHECK6 %s
+// RUN: not %clang_cc1 -verify %t.invalid 2>&1 | FileCheck -check-prefix=CHECK6 %s
 
 //      CHECK6: error: no expected directives found: consider use of 'expected-no-diagnostics'
 // CHECK6-NEXT: error: 'error' diagnostics seen but not expected:
 // CHECK6-NEXT:   (frontend): error reading '{{.*}}verify.c.tmp.invalid'
 // CHECK6-NEXT: 2 errors generated.
 
-// RUN: echo -e '//expected-error@2{{1}}\n#error 2' | %clang_cc1 -verify 2>&1 | FileCheck -check-prefix=CHECK7 %s
+// RUN: echo -e '//expected-error@2{{1}}\n#error 2' | not %clang_cc1 -verify 2>&1 | FileCheck -check-prefix=CHECK7 %s
 
 //      CHECK7: error: 'error' diagnostics expected but not seen:
 // CHECK7-NEXT:   Line 2 (directive at <stdin>:1): 1
@@ -126,7 +126,7 @@
 #endif
 
 #ifdef TEST8
-// RUN: %clang_cc1 -DTEST8 -verify %s 2>&1 | FileCheck -check-prefix=CHECK8 %s
+// RUN: not %clang_cc1 -DTEST8 -verify %s 2>&1 | FileCheck -check-prefix=CHECK8 %s
 
 // expected-warning@nonexistant-file:1 {{ }}
 // expected-error@-1 {{file 'nonexistant-file' could not be located}}
diff --git a/test/Frontend/verify2.c b/test/Frontend/verify2.c
index 04f80ad..73eda4d 100644
--- a/test/Frontend/verify2.c
+++ b/test/Frontend/verify2.c
@@ -1,5 +1,5 @@
 #if 0
-// RUN: %clang_cc1 -verify %s 2>&1 | FileCheck %s
+// RUN: not %clang_cc1 -verify %s 2>&1 | FileCheck %s
 
 // Please note that all comments are inside "#if 0" blocks so that
 // VerifyDiagnosticConsumer sees no comments while processing this
diff --git a/test/Frontend/verify3.c b/test/Frontend/verify3.c
index 0705b4b..421bea3 100644
--- a/test/Frontend/verify3.c
+++ b/test/Frontend/verify3.c
@@ -2,7 +2,7 @@
 // diagnostics are generated in relation to the mis-use and non-use of the
 // 'expected-no-diagnostics' directive.
 
-// RUN: %clang_cc1 -DTEST1 -verify %s 2>&1 | FileCheck -check-prefix=CHECK1 %s
+// RUN: not %clang_cc1 -DTEST1 -verify %s 2>&1 | FileCheck -check-prefix=CHECK1 %s
 #ifdef TEST1
 // expected-no-diagnostics
 // expected-note {{}}
@@ -12,7 +12,7 @@
 // CHECK1-NEXT: 1 error generated.
 #endif
 
-// RUN: %clang_cc1 -DTEST2 -verify %s 2>&1 | FileCheck -check-prefix=CHECK2 %s
+// RUN: not %clang_cc1 -DTEST2 -verify %s 2>&1 | FileCheck -check-prefix=CHECK2 %s
 #ifdef TEST2
 #warning X
 // expected-warning@-1 {{X}}
@@ -23,8 +23,8 @@
 // CHECK2-NEXT: 1 error generated.
 #endif
 
-// RUN: %clang_cc1 -DTEST3 -verify %s 2>&1 | FileCheck -check-prefix=CHECK3 %s
-// RUN: %clang_cc1 -verify 2>&1 | FileCheck -check-prefix=CHECK3 %s
+// RUN: not %clang_cc1 -DTEST3 -verify %s 2>&1 | FileCheck -check-prefix=CHECK3 %s
+// RUN: not %clang_cc1 -verify 2>&1 | FileCheck -check-prefix=CHECK3 %s
 #ifdef TEST3
 // no directives