In test/Driver/clang-g-opts.c with tests of the form

// RUN: %clang -S -v -o %t %s        2>&1 | not grep -w -- -g

using 'not' here isn't portable and doesn't work on at least
OpenBSD and likely other systems (bash builtin?).

patch to move this to FileCheck attached
Index: test/Driver/clang-g-opts.c
===================================================================
--- test/Driver/clang-g-opts.c  (revision 153174)
+++ test/Driver/clang-g-opts.c  (working copy)
@@ -1,5 +1,14 @@
-// RUN: %clang -S -v -o %t %s        2>&1 | not grep -w -- -g
-// RUN: %clang -S -v -o %t %s -g     2>&1 | grep -w -- -g
-// RUN: %clang -S -v -o %t %s -g0    2>&1 | not grep -w -- -g
-// RUN: %clang -S -v -o %t %s -g -g0 2>&1 | not grep -w -- -g
-// RUN: %clang -S -v -o %t %s -g0 -g 2>&1 | grep -w -- -g
+// RUN: %clang -S -v -o %t %s        2>&1 | FileCheck %s
+// CHECK-NOT: -g
+
+// RUN: %clang -S -v -o %t %s -g     2>&1 | FileCheck %s
+// CHECK: -g
+
+// RUN: %clang -S -v -o %t %s -g0    2>&1 | FileCheck %s
+// CHECK-NOT: -g
+
+// RUN: %clang -S -v -o %t %s -g -g0 2>&1 | FileCheck %s
+// CHECK-NOT: -g
+
+// RUN: %clang -S -v -o %t %s -g0 -g 2>&1 | FileCheck %s
+// CHECK: -g
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to