[Lldb-commits] [PATCH] D52270: TestMultilineExpr: validate evaluation for expressions spread over multiple lines

Stefan Gränitz via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 19 12:03:18 PDT 2018


sgraenitz added a comment.

In https://reviews.llvm.org/D52270#1239685, @aprantl wrote:

> What do you think about fixing that before landing this patch? Then we don't need to work around it.


Hm, we didn't finally decide for the fix and I don't want to raise the pressure on it artificially.
I think it will anyway reveal more places, where we forgot about this little detail and thus provide opportunity to improve also this test.

Of course, this also means that I can keep matching the specific string for this (hopefully short) foreseeable future.



================
Comment at: lit/Expr/TestMultilineExpr.test:9
+# CHECK: (lldb) expression
+# CHECK-NEXT: Enter expressions, then terminate with an empty line to evaluate:
+# CHECK-NEXT: (int) {{.*}} = 5
----------------
aprantl wrote:
> sgraenitz wrote:
> > Maybe it's nitpicking, but I'd actually prefer not to match this specific string. It could be any human-readable instruction. However, if I replace it with `{{.*}}` lit will complain that the match doesn't start on the next line:
> > ```
> > TestMultilineExpr.test:9:15: error: CHECK-NEXT: is on the same line as previous match
> > # CHECK-NEXT: {{.*}}
> >               ^
> > <stdin>:9:18: note: 'next' match was here
> > (lldb) expression
> >                  ^
> > <stdin>:9:18: note: previous match ended here
> > (lldb) expression
> >                  ^
> > ```
> > 
> > Any ideas how to get it right?
> why not:
> ```
> # CHECK: (lldb) expression
> # CHECK: (int) {{.*}} = 5
> ```
> ?
I think we can keep it like this for now.


https://reviews.llvm.org/D52270





More information about the lldb-commits mailing list