David Greene via llvm-dev
2020-Jul-07 15:15 UTC
[llvm-dev] [RFC] Compiled regression tests.
Michael Kruse via llvm-dev <llvm-dev at lists.llvm.org> writes:> Am Mo., 6. Juli 2020 um 08:55 Uhr schrieb David Greene <david.greene at hpe.com>: >> Is the behavior of CHECK-SAME documented anywhere? It's not on the main >> FileCheck web page. I assumed it started over from the beginning of the >> line but now I'm not sure. > > https://www.llvm.org/docs/CommandGuide/FileCheck.html#the-check-same-directiveBut that doesn't say whether multiple CHECK-SAME directives each start looking at the beginning of the line or whether they continue form where the previous CHECK-SAME left off. To me it makes the most sense if each CHECK-SAME starts from the beginning of the line and it would also seem to be much simpler to implement it that way. If it indeed works that way, then CHECK-SAME can be used to check things disregarding order within the line. -David
Robinson, Paul via llvm-dev
2020-Jul-07 16:09 UTC
[llvm-dev] [RFC] Compiled regression tests.
> -----Original Message----- > From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of David Greene > via llvm-dev > Sent: Tuesday, July 7, 2020 11:15 AM > To: Michael Kruse <llvmdev at meinersbur.de> > Cc: llvm-dev at lists.llvm.org > Subject: Re: [llvm-dev] [RFC] Compiled regression tests. > > Michael Kruse via llvm-dev <llvm-dev at lists.llvm.org> writes: > > > Am Mo., 6. Juli 2020 um 08:55 Uhr schrieb David Greene > <david.greene at hpe.com>: > >> Is the behavior of CHECK-SAME documented anywhere? It's not on the > main > >> FileCheck web page. I assumed it started over from the beginning of > the > >> line but now I'm not sure. > > > > https://www.llvm.org/docs/CommandGuide/FileCheck.html#the-check-same- > directive > > But that doesn't say whether multiple CHECK-SAME directives each start > looking at the beginning of the line or whether they continue form where > the previous CHECK-SAME left off. To me it makes the most sense if each > CHECK-SAME starts from the beginning of the line and it would also seem > to be much simpler to implement it that way. If it indeed works that > way, then CHECK-SAME can be used to check things disregarding order > within the line.CHECK-SAME starts where the previous match ended. It is not implicitly a DAG on the same line. Documentation patches welcome. CHECK-SAME is subtly different from appending the match expression to the previous directive, with a {{.*}} separator.[0] But that's more or less how it works. Using CHECK-SAME is mostly to keep directive lines from getting excessively long. --paulr [0] See my "FileCheck Follies" lightning talk from November 2016 https://www.youtube.com/watch?v=4rhW8knj0L8> > -David > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
David Greene via llvm-dev
2020-Jul-07 20:05 UTC
[llvm-dev] [RFC] Compiled regression tests.
"Robinson, Paul via llvm-dev" <llvm-dev at lists.llvm.org> writes:> CHECK-SAME starts where the previous match ended. It is not implicitly > a DAG on the same line. Documentation patches welcome.It's unfortunate we don't have a version of CHECK-SAME that restarts the match from the beginning. Maybe I should add one. CHECK-SAME seems like a misnomer. Perhaps CHECK-CONTINUE would have been more clear. -David