From: Richard Trieu Date: Wed, 31 Aug 2016 01:57:12 +0000 (+0000) Subject: Concatenate two FileCheck lines in a test. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f08aef7aa48a59d900845b61962c19ba1bec4f4c;p=clang Concatenate two FileCheck lines in a test. 'cc1' is a valid sequence of hexadecimal and sometimes can occur in the path when testing. This can lead to FileCheck matching the incorrect occurance of the 'cc1' string and causing a test failure. Join two adjacent flags together into one check to prevent this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280189 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Driver/cl-pch.c b/test/Driver/cl-pch.c index 75e2cf8c41..bee25b3114 100644 --- a/test/Driver/cl-pch.c +++ b/test/Driver/cl-pch.c @@ -12,8 +12,7 @@ // /Yc with a .c file should build a c pch file. // RUN: %clang_cl -Werror /Yc%S/Inputs/pchfile.h /FI%S/Inputs/pchfile.h /c /Fo%t/pchfile.obj /Fp%t/pchfile.pch -v -- %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-YC %s -// CHECK-YC: cc1 -// CHECK-YC-SAME: -emit-pch +// CHECK-YC: cc1{{.* .*}}-emit-pch // CHECK-YC-SAME: -o // CHECK-YC-SAME: pchfile.pch // CHECK-YC-SAME: -x @@ -22,8 +21,7 @@ // But not if /TP changes the input language to C++. // RUN: %clang_cl /TP -Werror /Yc%S/Inputs/pchfile.h /FI%S/Inputs/pchfile.h /c /Fo%t/pchfile.obj /Fp%t/pchfile.pch -v -- %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-YCTP %s -// CHECK-YCTP: cc1 -// CHECK-YCTP-SAME: -emit-pch +// CHECK-YCTP: cc1{{.* .*}}-emit-pch // CHECK-YCTP-SAME: -o // CHECK-YCTP-SAME: pchfile.pch // CHECK-YCTP-SAME: -x @@ -32,8 +30,7 @@ // Except if a later /TC changes it back. // RUN: %clang_cl -Werror /Yc%S/Inputs/pchfile.h /FI%S/Inputs/pchfile.h /c /Fo%t/pchfile.obj /Fp%t/pchfile.pch -v -- %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-YCTPTC %s -// CHECK-YCTPTC: cc1 -// CHECK-YCTPTC-SAME: -emit-pch +// CHECK-YCTPTC: cc1{{.* .*}}-emit-pch // CHECK-YCTPTC-SAME: -o // CHECK-YCTPTC-SAME: pchfile.pch // CHECK-YCTPTC-SAME: -x @@ -42,8 +39,7 @@ // Also check lower-case /Tp flag. // RUN: %clang_cl -Werror /Tp%s /Yc%S/Inputs/pchfile.h /FI%S/Inputs/pchfile.h /c /Fo%t/pchfile.obj /Fp%t/pchfile.pch -v 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-YCTp %s -// CHECK-YCTp: cc1 -// CHECK-YCTp-SAME: -emit-pch +// CHECK-YCTp: cc1{{.* .*}}-emit-pch // CHECK-YCTp-SAME: -o // CHECK-YCTp-SAME: pchfile.pch // CHECK-YCTp-SAME: -x