r367709 - [Driver][test] Avoid undefined grep in darwin-ld.c

Hubert Tong via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 2 12:26:06 PDT 2019

Author: hubert.reinterpretcast
Date: Fri Aug  2 12:26:05 2019
New Revision: 367709

URL: http://llvm.org/viewvc/llvm-project?rev=367709&view=rev
[Driver][test] Avoid undefined grep in darwin-ld.c

question-mark is not a BRE special character.

POSIX.1-2017 XBD Section 9.3.2 indicates that the interpretation of `\?`
as used by rC366282 is undefined. This patch uses an ERE instead.

Reviewers: rnk, daltenty, xingxue, jasonliu

Reviewed By: rnk

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65668


Modified: cfe/trunk/test/Driver/darwin-ld.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-ld.c?rev=367709&r1=367708&r2=367709&view=diff
--- cfe/trunk/test/Driver/darwin-ld.c (original)
+++ cfe/trunk/test/Driver/darwin-ld.c Fri Aug  2 12:26:05 2019
@@ -5,9 +5,9 @@
 // Make sure we run dsymutil on source input files.
 // RUN: %clang -target i386-apple-darwin9 -### -g %s -o BAR 2> %t.log
-// RUN: grep '".*dsymutil\(.exe\)\?" "-o" "BAR.dSYM" "BAR"' %t.log
+// RUN: grep -E '".*dsymutil(\.exe)?" "-o" "BAR.dSYM" "BAR"' %t.log
 // RUN: %clang -target i386-apple-darwin9 -### -g -filelist FOO %s -o BAR 2> %t.log
-// RUN: grep '".*dsymutil\(.exe\)\?" "-o" "BAR.dSYM" "BAR"' %t.log
+// RUN: grep -E '".*dsymutil(\.exe)?" "-o" "BAR.dSYM" "BAR"' %t.log
 // Check linker changes that came with new linkedit format.
 // RUN: touch %t.o

More information about the cfe-commits mailing list