[PATCH] D49348: Harden/relax clang/test/CodeGen/opt-record-MIR.c test

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 15 12:35:50 PDT 2018


lebedev.ri created this revision.
lebedev.ri added reviewers: anemet, aaron.ballman, hfinkel.
Herald added a subscriber: cfe-commits.

If the build path is short, `Line` field can end up fitting on the same line as `File`,
but the `{{.*}}` would consume it. Keeping in mind https://reviews.llvm.org/rL293149, i think we can fix it,
while keeping it working when there are and there are not any quotations.
At least this fixes this test for me.


Repository:
  rC Clang

https://reviews.llvm.org/D49348

Files:
  test/CodeGen/opt-record-MIR.c


Index: test/CodeGen/opt-record-MIR.c
===================================================================
--- test/CodeGen/opt-record-MIR.c
+++ test/CodeGen/opt-record-MIR.c
@@ -21,8 +21,9 @@
 // YAML: --- !Missed
 // YAML: Pass:            regalloc
 // YAML: Name:            LoopSpillReload
-// YAML: DebugLoc:        { File: {{.*}},
-// YAML:                    Line: 10, Column: 11 }
+// YAML: DebugLoc:        { File: {{.*}}.c{{['"]*}},
+// YAML:                    Line: 10,
+// YAML:                    Column: 11 }
 // YAML: Function:        foo
 // YAML: Args:
 // YAML:   - NumSpills:       '{{.}}'


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49348.155589.patch
Type: text/x-patch
Size: 608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180715/4b7f0c6a/attachment.bin>


More information about the cfe-commits mailing list