[PATCH] D65668: [Driver][test] Avoid undefined grep in darwin-ld.c

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 2 11:23:39 PDT 2019


hubert.reinterpretcast created this revision.
hubert.reinterpretcast added reviewers: rnk, daltenty, xingxue, jasonliu.
Herald added a project: clang.

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 <https://reviews.llvm.org/rC366282> is undefined. This patch uses an ERE instead.


Repository:
  rC Clang

https://reviews.llvm.org/D65668

Files:
  test/Driver/darwin-ld.c


Index: test/Driver/darwin-ld.c
===================================================================
--- test/Driver/darwin-ld.c
+++ test/Driver/darwin-ld.c
@@ -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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65668.213095.patch
Type: text/x-patch
Size: 739 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190802/a783aa96/attachment.bin>


More information about the cfe-commits mailing list