Skip to content

Clarification on --strict-whitespace #52

Description

@alexarice

I'm unsure what upstream LLVM does here and can't find any documentation so thought I would just ask for clarification.

In xdsl, some tests are failing with the latest release (see xdslproject/xdsl#6411). Some of these are #48, which I'm happy to change to CHECK-EMPTY, but some seem to be to do with --strict-whitespace.

It seems that the rule for checking the amount of whitespace is strange here, because:

  • It seems 0 whitespace is counted as 0. i.e. // CHECK:builtin.module { validates builtin.module {
  • 1 whitespace is actually 0. i.e. // CHECK: builtin.module { validates builtin.module {
  • more generally n+1 is actually n in the same way, so that the first space of the pattern seems to be ignored.

I can change the tests, but wanted to make sure that this was the intentional behaviour first. TBH it would make more sense to me to say that there always must be a space after the colon, because then at least its consistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions