]> granicus.if.org Git - clang/commitdiff
[Driver][test] Avoid undefined grep in darwin-ld.c
authorHubert Tong <hubert.reinterpretcast@gmail.com>
Fri, 2 Aug 2019 19:26:05 +0000 (19:26 +0000)
committerHubert Tong <hubert.reinterpretcast@gmail.com>
Fri, 2 Aug 2019 19:26:05 +0000 (19:26 +0000)
Summary:
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

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

test/Driver/darwin-ld.c

index eb357a9819ffc9a59c80781c84191a329c59e4ea..445082984210e303f43ce8d38aae2d145cec2e92 100644 (file)
@@ -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