<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/FileCheck, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[FileCheck] Improve printing variables with escapes (#145865)</title>
<updated>2025-06-27T20:39:07+00:00</updated>
<author>
<name>Mészáros Gergely</name>
<email>gergely.meszaros@intel.com</email>
</author>
<published>2025-06-27T20:39:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=98f7d756e334278e2e34177fa11e5a604d3b01ff'/>
<id>98f7d756e334278e2e34177fa11e5a604d3b01ff</id>
<content type='text'>
Firstly fix FileCheck printing string variables
double-escaped (first regex, then C-style).
    
This is confusing because it is not clear if the printed
value is the literal value or exactly how it is escaped, without
looking at FileCheck's source code.
    
Secondly, only escape when doing so makes it easier to read the value
(when the string contains tabs, newlines or non-printable characters).
When the variable value is escaped, make a note of it in the output too,
in order to avoid confusion.
    
The common case that is motivating this change is variables that contain
windows style paths with backslashes. These were printed as
`"C:\\\\Program Files\\\\MyApp\\\\file.txt"`.
Now prefer to print them as `"C:\Program Files\MyApp\file.txt"`.
Printing the value literally also makes it easier to search for
variables in the output, since the user can just copy-paste it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Firstly fix FileCheck printing string variables
double-escaped (first regex, then C-style).
    
This is confusing because it is not clear if the printed
value is the literal value or exactly how it is escaped, without
looking at FileCheck's source code.
    
Secondly, only escape when doing so makes it easier to read the value
(when the string contains tabs, newlines or non-printable characters).
When the variable value is escaped, make a note of it in the output too,
in order to avoid confusion.
    
The common case that is motivating this change is variables that contain
windows style paths with backslashes. These were printed as
`"C:\\\\Program Files\\\\MyApp\\\\file.txt"`.
Now prefer to print them as `"C:\Program Files\MyApp\file.txt"`.
Printing the value literally also makes it easier to search for
variables in the output, since the user can just copy-paste it.</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck][NFC] Pre-commit test for printing escaped variables (#145906)</title>
<updated>2025-06-26T16:00:36+00:00</updated>
<author>
<name>Mészáros Gergely</name>
<email>gergely.meszaros@intel.com</email>
</author>
<published>2025-06-26T16:00:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=07e3c859b0cb5c2467f77931821cc681c589930f'/>
<id>07e3c859b0cb5c2467f77931821cc681c589930f</id>
<content type='text'>
For #145865</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For #145865</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Renormalize line endings whitespace only after dccebddb3b80"</title>
<updated>2024-10-18T20:16:50+00:00</updated>
<author>
<name>Luke Drummond</name>
<email>luke.drummond@codeplay.com</email>
</author>
<published>2024-10-18T20:16:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b55c52c047a167f42abbde9a33356cfb96b82c7f'/>
<id>b55c52c047a167f42abbde9a33356cfb96b82c7f</id>
<content type='text'>
This reverts commit 9d98acb196a40fee5229afeb08f95fd36d41c10a.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 9d98acb196a40fee5229afeb08f95fd36d41c10a.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Finally formalise our defacto line-ending policy"</title>
<updated>2024-10-18T20:16:24+00:00</updated>
<author>
<name>Luke Drummond</name>
<email>luke.drummond@codeplay.com</email>
</author>
<published>2024-10-18T20:16:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e669bbbb7265a7d4d59bac2d3889194efa167ea8'/>
<id>e669bbbb7265a7d4d59bac2d3889194efa167ea8</id>
<content type='text'>
This reverts commit dccebddb3b802c4c1fe287222e454b63f850f012.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit dccebddb3b802c4c1fe287222e454b63f850f012.
</pre>
</div>
</content>
</entry>
<entry>
<title>Renormalize line endings whitespace only after dccebddb3b80</title>
<updated>2024-10-17T13:49:26+00:00</updated>
<author>
<name>Luke Drummond</name>
<email>luke.drummond@codeplay.com</email>
</author>
<published>2024-10-17T13:49:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9d98acb196a40fee5229afeb08f95fd36d41c10a'/>
<id>9d98acb196a40fee5229afeb08f95fd36d41c10a</id>
<content type='text'>
Line ending policies were changed in the parent, dccebddb3b80. To make
it easier to resolve downstream merge conflicts after line-ending
policies are adjusted this is a separate whitespace-only commit. If you
have merge conflicts as a result, you can simply `git add --renormalize
-u &amp;&amp; git merge --continue` or `git add --renormalize -u &amp;&amp; git rebase
--continue` - depending on your workflow.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Line ending policies were changed in the parent, dccebddb3b80. To make
it easier to resolve downstream merge conflicts after line-ending
policies are adjusted this is a separate whitespace-only commit. If you
have merge conflicts as a result, you can simply `git add --renormalize
-u &amp;&amp; git merge --continue` or `git add --renormalize -u &amp;&amp; git rebase
--continue` - depending on your workflow.
</pre>
</div>
</content>
</entry>
<entry>
<title>Finally formalise our defacto line-ending policy</title>
<updated>2024-10-17T13:47:54+00:00</updated>
<author>
<name>Luke Drummond</name>
<email>luke.drummond@codeplay.com</email>
</author>
<published>2024-03-22T17:09:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dccebddb3b802c4c1fe287222e454b63f850f012'/>
<id>dccebddb3b802c4c1fe287222e454b63f850f012</id>
<content type='text'>
Historically, we've not automatically enforced how git tracks line
endings, but there are many, many commits that "undo" unintended CRLFs
getting into history.

`git log --pretty=oneline --grep=CRLF` shows nearly 100 commits
involving reverts of CRLF making its way into the index and then
history. As far as I can tell, there are none the other way round except
for specific cases like `.bat` files or tests for parsers that need to
accept such sequences.

Of note, one of the earliest of those listed in that output is:

```
  commit 9795860250734e5c2a879546c534e35d9edd5944
  Author: NAKAMURA Takumi &lt;geek4civic@gmail.com&gt;
  Date:   Thu Feb 3 11:41:27 2011 +0000

      cmake/*: Add svn:eol-style=native and fix CRLF.

      llvm-svn: 124793
```

...which introduced such a defacto policy for subversion.

With old versions of git, it's been a bit of a crap-shoot whether
enforcing storing line endings in the history will upset checkouts on
machines where such line endings are the norm. Indeed many users have
enforced that git checks out the working copy according to a global or
per-user config via core crlf, or core autocrlf.

For ~8 years now[1], however, git has supported the ability to "do as
the Romans do" on checkout, but internally store subsets of text files
with line-endings specified via a system of patterns in the
`.gitattributes` file. Since we now have this ability, and we've been
specifying attributes for various binary files, I think it makes sense
to rid us of all that work converting things "back", and just let git
handle the local checkout. Thus the new toplevel policy here is

    * text=auto

In simple terms this means "unless otherwise specified, convert all
files considered "text" files to LF in the project history, but check
them out as expected on the local machine. What is "expected on the
local machine" is dependent on configuration and default.

For those files in the repository that *do* need CRLF endings, I've
adopted a policy of `eol=crlf` which means that git will store them in
history with LF, but regardless of user config, they'll be checked out
in tree with CRLF.

Finally, existing files have been "corrected" in history via `git add
--renormalize .`

End users should *not* need to adjust their local git config or
workflow.

[1]: git 2.10 was released with fixed support for fine-grained
line-ending tracking that respects user-config *and* repo policy. This
can be considered the point at which git will respect both the user's
local working tree preference *and* the history as specified by the
maintainers. See
https://github.com/git/git/blob/master/Documentation/RelNotes/2.10.0.txt#L248
for the release note.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Historically, we've not automatically enforced how git tracks line
endings, but there are many, many commits that "undo" unintended CRLFs
getting into history.

`git log --pretty=oneline --grep=CRLF` shows nearly 100 commits
involving reverts of CRLF making its way into the index and then
history. As far as I can tell, there are none the other way round except
for specific cases like `.bat` files or tests for parsers that need to
accept such sequences.

Of note, one of the earliest of those listed in that output is:

```
  commit 9795860250734e5c2a879546c534e35d9edd5944
  Author: NAKAMURA Takumi &lt;geek4civic@gmail.com&gt;
  Date:   Thu Feb 3 11:41:27 2011 +0000

      cmake/*: Add svn:eol-style=native and fix CRLF.

      llvm-svn: 124793
```

...which introduced such a defacto policy for subversion.

With old versions of git, it's been a bit of a crap-shoot whether
enforcing storing line endings in the history will upset checkouts on
machines where such line endings are the norm. Indeed many users have
enforced that git checks out the working copy according to a global or
per-user config via core crlf, or core autocrlf.

For ~8 years now[1], however, git has supported the ability to "do as
the Romans do" on checkout, but internally store subsets of text files
with line-endings specified via a system of patterns in the
`.gitattributes` file. Since we now have this ability, and we've been
specifying attributes for various binary files, I think it makes sense
to rid us of all that work converting things "back", and just let git
handle the local checkout. Thus the new toplevel policy here is

    * text=auto

In simple terms this means "unless otherwise specified, convert all
files considered "text" files to LF in the project history, but check
them out as expected on the local machine. What is "expected on the
local machine" is dependent on configuration and default.

For those files in the repository that *do* need CRLF endings, I've
adopted a policy of `eol=crlf` which means that git will store them in
history with LF, but regardless of user config, they'll be checked out
in tree with CRLF.

Finally, existing files have been "corrected" in history via `git add
--renormalize .`

End users should *not* need to adjust their local git config or
workflow.

[1]: git 2.10 was released with fixed support for fine-grained
line-ending tracking that respects user-config *and* repo policy. This
can be considered the point at which git will respect both the user's
local working tree preference *and* the history as specified by the
maintainers. See
https://github.com/git/git/blob/master/Documentation/RelNotes/2.10.0.txt#L248
for the release note.
</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck] Fix parsing empty global and pseudo variable names (#83667)</title>
<updated>2024-03-05T08:20:16+00:00</updated>
<author>
<name>Daniil Kovalev</name>
<email>dkovalev@accesssoftek.com</email>
</author>
<published>2024-03-05T08:20:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3105cfe783d861e63c647469cc3a6c9b91f8bb4a'/>
<id>3105cfe783d861e63c647469cc3a6c9b91f8bb4a</id>
<content type='text'>
Reland #82595 with fixes of build failures related to colored output.
See https://lab.llvm.org/buildbot/#/builders/139/builds/60549
Use `%ProtectFileCheckOutput` to avoid colored output.
Original commit message below.

In `Pattern::parseVariable`, for global variables (those starting with '$')
and for pseudo variables (those starting with '@') the first character is
consumed before actual variable name parsing. If the name is empty, it
leads to out-of-bound access to the corresponding `StringRef`.

This patch adds an if statement against the case described.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reland #82595 with fixes of build failures related to colored output.
See https://lab.llvm.org/buildbot/#/builders/139/builds/60549
Use `%ProtectFileCheckOutput` to avoid colored output.
Original commit message below.

In `Pattern::parseVariable`, for global variables (those starting with '$')
and for pseudo variables (those starting with '@') the first character is
consumed before actual variable name parsing. If the name is empty, it
leads to out-of-bound access to the corresponding `StringRef`.

This patch adds an if statement against the case described.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[FileCheck] Fix parsing empty global and pseudo variable names" (#83657)</title>
<updated>2024-03-02T05:09:10+00:00</updated>
<author>
<name>Daniil Kovalev</name>
<email>dkovalev@accesssoftek.com</email>
</author>
<published>2024-03-02T05:09:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=28b354a96054196cc3c50c2517b0509d0d316d42'/>
<id>28b354a96054196cc3c50c2517b0509d0d316d42</id>
<content type='text'>
Reverts llvm/llvm-project#82595

See build failure
https://lab.llvm.org/buildbot/#/builders/139/builds/60549</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#82595

See build failure
https://lab.llvm.org/buildbot/#/builders/139/builds/60549</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck] Fix parsing empty global and pseudo variable names (#82595)</title>
<updated>2024-03-02T04:03:50+00:00</updated>
<author>
<name>Daniil Kovalev</name>
<email>dkovalev@accesssoftek.com</email>
</author>
<published>2024-03-02T04:03:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aab3d13179dc5a37465a0e6fbf1b9369a4e6e50f'/>
<id>aab3d13179dc5a37465a0e6fbf1b9369a4e6e50f</id>
<content type='text'>
In `Pattern::parseVariable`, for global variables (those starting with
'$') and for pseudo variables (those starting with '@') the first
character is consumed before actual variable name parsing. If the name
is empty, it leads to out-of-bound access to the corresponding
`StringRef`.

This patch adds an if statement against the case described.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In `Pattern::parseVariable`, for global variables (those starting with
'$') and for pseudo variables (those starting with '@') the first
character is consumed before actual variable name parsing. If the name
is empty, it leads to out-of-bound access to the corresponding
`StringRef`.

This patch adds an if statement against the case described.</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck]: Fix diagnostics for NOT prefixes (#78412)</title>
<updated>2024-01-19T15:08:24+00:00</updated>
<author>
<name>Vinayak Dev</name>
<email>104419489+vinayakdsci@users.noreply.github.com</email>
</author>
<published>2024-01-19T15:08:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=497a8604b39f8b5736c389f6d7ccd8242a122cbf'/>
<id>497a8604b39f8b5736c389f6d7ccd8242a122cbf</id>
<content type='text'>
Fixes #70221 

Fix a bug in FileCheck that corrects the error message when multiple
prefixes are provided
through --check-prefixes and one of them is a PREFIX-NOT.

Earlier, only the first of the provided prefixes was displayed as the
erroneous prefix, while the
actual error might be on the prefix that occurred at the end of the
prefix list in the input file.

Now, the right NOT prefix is shown in the error message.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #70221 

Fix a bug in FileCheck that corrects the error message when multiple
prefixes are provided
through --check-prefixes and one of them is a PREFIX-NOT.

Earlier, only the first of the provided prefixes was displayed as the
erroneous prefix, while the
actual error might be on the prefix that occurred at the end of the
prefix list in the input file.

Now, the right NOT prefix is shown in the error message.</pre>
</div>
</content>
</entry>
</feed>
