[PATCH] D28896: [FileCheck] Add directive for checking for blank lines

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 21 03:31:34 PDT 2018


jhenderson added a comment.

In https://reviews.llvm.org/D28896#1138983, @jeroen.dobbelaere wrote:

> How about using an empty 'CHECK-NEXT:' statement for this ?
>
>   ; CHECK:foo
>   ; CHECK-NEXT:  
>   ; CHECK-NEXT:bar
>   
>
> That would make it much easier to copy-paste a reference piece, add 'CHECK-NEXT:' in front, except for the first line, and be done with it.


What would be the meaning of CHECK-NEXT in this situation? Because that would to me, match an empty string, expected to be on the next line. The next empty string after foo is trivially on the same line as foo. Note that CHECK-NEXT searches for the next instance of the specified string, and fails if it finds it anywhere other than on the next line, rather than just searching the next line for the specified string.


https://reviews.llvm.org/D28896





More information about the llvm-commits mailing list