<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/unittests/FileCheck/FileCheckTest.cpp, branch main</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>[llvm] Use StringRef::{starts,ends}_with (NFC)</title>
<updated>2023-12-14T06:46:02+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2023-12-14T06:46:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5c9d82de6b72cc0c037daecce452c450870f0034'/>
<id>5c9d82de6b72cc0c037daecce452c450870f0034</id>
<content type='text'>
This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,ends}_with in C++20.

I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,ends}_with in C++20.

I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] Use const references to avoid copying objects in for-loops</title>
<updated>2023-09-27T20:39:30+00:00</updated>
<author>
<name>Gregory Alfonso</name>
<email>gfunni234@gmail.com</email>
</author>
<published>2023-09-27T20:39:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=40dc8e6889c055172dfa66823b3e0aa073240086'/>
<id>40dc8e6889c055172dfa66823b3e0aa073240086</id>
<content type='text'>
Differential Revision: https://reviews.llvm.org/D139487
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Differential Revision: https://reviews.llvm.org/D139487
</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck] Fix MSVC 'argument': truncation from 'int' to 'bool' warning.</title>
<updated>2023-08-08T09:05:24+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2023-08-08T09:05:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5bd8f481c1613b864bde53c998a4fd74f4b7cd21'/>
<id>5bd8f481c1613b864bde53c998a4fd74f4b7cd21</id>
<content type='text'>
Ensure expectOperationValueResult performs the is_integral_v as constexpr to prevent MSVC getting confused between the mixture of integer / string constructors in the if-else.

Warning introduced in D150880
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure expectOperationValueResult performs the is_integral_v as constexpr to prevent MSVC getting confused between the mixture of integer / string constructors in the if-else.

Warning introduced in D150880
</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck] Turn errors into assert in valueFromStringRepr()</title>
<updated>2023-08-07T20:27:44+00:00</updated>
<author>
<name>Thomas Preud'homme</name>
<email>thomas.preudhomme@arm.com</email>
</author>
<published>2023-06-30T22:29:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b743c19360a67af4a709bd839e8c80ad17f71a1c'/>
<id>b743c19360a67af4a709bd839e8c80ad17f71a1c</id>
<content type='text'>
getWildcardRegex() guarantees that only valid hex numbers are matched by
FileCheck numeric expressions. This commit therefore only asserts the
lack of parsing failure in valueFromStringRepr().

Depends On D154430

Reviewed By: arichardson

Differential Revision: https://reviews.llvm.org/D154431
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
getWildcardRegex() guarantees that only valid hex numbers are matched by
FileCheck numeric expressions. This commit therefore only asserts the
lack of parsing failure in valueFromStringRepr().

Depends On D154430

Reviewed By: arichardson

Differential Revision: https://reviews.llvm.org/D154431
</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck, 4/4] NFC: Stop using ExpressionValue</title>
<updated>2023-08-07T16:36:05+00:00</updated>
<author>
<name>Thomas Preud'homme</name>
<email>thomas.preudhomme@arm.com</email>
</author>
<published>2023-07-03T22:51:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e15e969a4faca759fe7f0e4ab0f54aed43f98bbc'/>
<id>e15e969a4faca759fe7f0e4ab0f54aed43f98bbc</id>
<content type='text'>
Use APInt directly instead.

Depends On D150880

Reviewed By: arichardson

Differential Revision: https://reviews.llvm.org/D154430
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use APInt directly instead.

Depends On D150880

Reviewed By: arichardson

Differential Revision: https://reviews.llvm.org/D154430
</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck, 3/4] Allow AP value for numeric expressions</title>
<updated>2023-08-07T13:48:48+00:00</updated>
<author>
<name>Thomas Preud'homme</name>
<email>thomas.preudhomme@arm.com</email>
</author>
<published>2023-08-07T08:37:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0726cb00471850ead0835e5d3806c7aef5bb0b21'/>
<id>0726cb00471850ead0835e5d3806c7aef5bb0b21</id>
<content type='text'>
Use APInt to represent numeric variables and expressions, therefore
removing overflow concerns. Only remains underflow when the format of an
expression is unsigned (incl. hex values) but the result is negative.
Note that this can only happen when substituting an expression, not when
capturing since the regex used to capture unsigned value will not include
minus sign, hence all the code removal for match propagation testing.
This is what this patch implement.

Reviewed By: arichardson

Differential Revision: https://reviews.llvm.org/D150880
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use APInt to represent numeric variables and expressions, therefore
removing overflow concerns. Only remains underflow when the format of an
expression is unsigned (incl. hex values) but the result is negative.
Note that this can only happen when substituting an expression, not when
capturing since the regex used to capture unsigned value will not include
minus sign, hence all the code removal for match propagation testing.
This is what this patch implement.

Reviewed By: arichardson

Differential Revision: https://reviews.llvm.org/D150880
</pre>
</div>
</content>
</entry>
<entry>
<title>[FileCheck, 2/4] NFC: Switch to APInt getter for ExpressionValue</title>
<updated>2023-07-04T20:42:11+00:00</updated>
<author>
<name>Thomas Preud'homme</name>
<email>thomas.preudhomme@arm.com</email>
</author>
<published>2023-06-29T21:44:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fc0d1c05a04b7b3fbb8805de53d695f0deeac57c'/>
<id>fc0d1c05a04b7b3fbb8805de53d695f0deeac57c</id>
<content type='text'>
Use an APInt getter as the only interface to getting the value out of an
ExpressionValue. This paves the way to switch ExpressionValue to handle
any integer without causing too big of a patch.

Reviewed By: arichardson

Differential Revision: https://reviews.llvm.org/D154429
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use an APInt getter as the only interface to getting the value out of an
ExpressionValue. This paves the way to switch ExpressionValue to handle
any integer without causing too big of a patch.

Reviewed By: arichardson

Differential Revision: https://reviews.llvm.org/D154429
</pre>
</div>
</content>
</entry>
<entry>
<title>Turn unreachable error into assert</title>
<updated>2023-05-23T12:52:22+00:00</updated>
<author>
<name>Thomas Preud'homme</name>
<email>thomas.preudhomme@arm.com</email>
</author>
<published>2023-05-16T09:22:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=13eb298d5c3c31550fee0c889d3fd3a265450e3d'/>
<id>13eb298d5c3c31550fee0c889d3fd3a265450e3d</id>
<content type='text'>
Function valueFromStringRepr() throws an error on missing 0x prefix when
parsing a number string into a value. However, getWildcardRegex() already
ensures that only text with the 0x prefix will match and be parsed,
making that error throwing code dead code. This commit turn the code
into an assert and remove the unit tests exercising that test
accordingly.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D150797
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Function valueFromStringRepr() throws an error on missing 0x prefix when
parsing a number string into a value. However, getWildcardRegex() already
ensures that only text with the 0x prefix will match and be parsed,
making that error throwing code dead code. This commit turn the code
into an assert and remove the unit tests exercising that test
accordingly.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D150797
</pre>
</div>
</content>
</entry>
<entry>
<title>std::optional::value =&gt; operator*/operator-&gt;</title>
<updated>2022-12-16T22:44:08+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2022-12-16T22:44:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2fa744e631cbabe583da010ec56560edbc7a5384'/>
<id>2fa744e631cbabe583da010ec56560edbc7a5384</id>
<content type='text'>
value() has undesired exception checking semantics and calls
__throw_bad_optional_access in libc++. Moreover, the API is unavailable without
_LIBCPP_NO_EXCEPTIONS on older Mach-O platforms (see
_LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS).

This commit fixes LLVMAnalysis and its dependencies.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
value() has undesired exception checking semantics and calls
__throw_bad_optional_access in libc++. Moreover, the API is unavailable without
_LIBCPP_NO_EXCEPTIONS on older Mach-O platforms (see
_LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS).

This commit fixes LLVMAnalysis and its dependencies.
</pre>
</div>
</content>
</entry>
</feed>
