<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/lib/Analysis/FlowSensitive/Transfer.cpp, branch users/jofrn/atomicvec-stack3</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>[Analysis] Remove unused includes (NFC) (#142255)</title>
<updated>2025-05-31T22:03:49+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-05-31T22:03:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bbb3d2177485ea4e182c369663e68f790881f557'/>
<id>bbb3d2177485ea4e182c369663e68f790881f557</id>
<content type='text'>
These are identified by misc-include-cleaner.  I've filtered out those
that break builds.  Also, I'm staying away from llvm-config.h,
config.h, and Compiler.h, which likely cause platform- or
compiler-specific build failures.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are identified by misc-include-cleaner.  I've filtered out those
that break builds.  Also, I'm staying away from llvm-config.h,
config.h, and Compiler.h, which likely cause platform- or
compiler-specific build failures.</pre>
</div>
</content>
</entry>
<entry>
<title>Reland [clang][dataflow] Fix unsupported types always being equal (#131575)</title>
<updated>2025-03-26T09:34:37+00:00</updated>
<author>
<name>Discookie</name>
<email>viktor.cseh@ericsson.com</email>
</author>
<published>2025-03-26T09:34:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a9a83387979a6c6dc0f508fe0b26c8d8fa7f5361'/>
<id>a9a83387979a6c6dc0f508fe0b26c8d8fa7f5361</id>
<content type='text'>
Relands #129502.

Previously when the framework encountered unsupported values (such as
enum classes), they were always treated as equal when comparing with
`==`, regardless of their actual values being different.
Now the two sides are only equal if there's a Value assigned to them.

Added handling for the special case of `nullptr == nullptr`, to preserve
the behavior of untyped `nullptr` having no value.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Relands #129502.

Previously when the framework encountered unsupported values (such as
enum classes), they were always treated as equal when comparing with
`==`, regardless of their actual values being different.
Now the two sides are only equal if there's a Value assigned to them.

Added handling for the special case of `nullptr == nullptr`, to preserve
the behavior of untyped `nullptr` having no value.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[clang][dataflow] Fix unsupported types always being equal" (#129761)</title>
<updated>2025-03-04T20:48:42+00:00</updated>
<author>
<name>Jan Voung</name>
<email>jvoung@google.com</email>
</author>
<published>2025-03-04T20:48:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d6301b218c6698ceb0db1753c8de480d37d11cf8'/>
<id>d6301b218c6698ceb0db1753c8de480d37d11cf8</id>
<content type='text'>
Reverts llvm/llvm-project#129502

seeing new crashes around
https://github.com/google/crubit/blob/859520eca82d60a169fb85cdbf648c57d0a14a99/nullability/test/smart_pointers_diagnosis.cc#L57

Would like some time to investigate.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#129502

seeing new crashes around
https://github.com/google/crubit/blob/859520eca82d60a169fb85cdbf648c57d0a14a99/nullability/test/smart_pointers_diagnosis.cc#L57

Would like some time to investigate.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][dataflow] Fix unsupported types always being equal (#129502)</title>
<updated>2025-03-04T10:38:06+00:00</updated>
<author>
<name>Discookie</name>
<email>viktor.cseh@ericsson.com</email>
</author>
<published>2025-03-04T10:38:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=680391f07a45272bb9bfd385cf4c6846b8be32dd'/>
<id>680391f07a45272bb9bfd385cf4c6846b8be32dd</id>
<content type='text'>
Previously when the framework encountered unsupported values (such as
enum classes), they were always treated as equal when comparing with
`==`, regardless of their actual values being different.
Now the two sides are only equal if there's a Value assigned to them.

Added a Value assignment for `nullptr`, to handle the special case of
`nullptr == nullptr`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously when the framework encountered unsupported values (such as
enum classes), they were always treated as equal when comparing with
`==`, regardless of their actual values being different.
Now the two sides are only equal if there's a Value assigned to them.

Added a Value assignment for `nullptr`, to handle the special case of
`nullptr == nullptr`.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][dataflow] Fix bug in `buildContainsExprConsumedInDifferentBlock()`. (#100874)</title>
<updated>2024-07-29T09:24:26+00:00</updated>
<author>
<name>martinboehme</name>
<email>mboehme@google.com</email>
</author>
<published>2024-07-29T09:24:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0362a29905ab8d68a8eb48741840a514b66552f8'/>
<id>0362a29905ab8d68a8eb48741840a514b66552f8</id>
<content type='text'>
This was missing a call to `ignoreCFGOmittedNodes()`. As a result, the
function
would erroneously conclude that a block did not contain an expression
consumed
in a different block if the expression in question was surrounded by a
`ParenExpr` in the consuming block. The patch adds a test that triggers
this
scenario (and fails without the fix).

To prevent this kind of bug in the future, the patch also adds a new
method
`blockForStmt()` to `AdornedCFG` that calls `ignoreCFGOmittedNodes()`
and is
preferred over accessing `getStmtToBlock()` directly.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was missing a call to `ignoreCFGOmittedNodes()`. As a result, the
function
would erroneously conclude that a block did not contain an expression
consumed
in a different block if the expression in question was surrounded by a
`ParenExpr` in the consuming block. The patch adds a test that triggers
this
scenario (and fails without the fix).

To prevent this kind of bug in the future, the patch also adds a new
method
`blockForStmt()` to `AdornedCFG` that calls `ignoreCFGOmittedNodes()`
and is
preferred over accessing `getStmtToBlock()` directly.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][nullability] Improve modeling of `++`/`--` operators. (#96601)</title>
<updated>2024-06-26T13:03:37+00:00</updated>
<author>
<name>martinboehme</name>
<email>mboehme@google.com</email>
</author>
<published>2024-06-26T13:03:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=85f47fdd039549ed7e89b53ca34b0b35456ffe3d'/>
<id>85f47fdd039549ed7e89b53ca34b0b35456ffe3d</id>
<content type='text'>
We definitely know that these operations change the value of their
operand, so
clear out any value associated with it. We don't create a new value,
instead
leaving it to the analysis to do this if desired.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We definitely know that these operations change the value of their
operand, so
clear out any value associated with it. We don't create a new value,
instead
leaving it to the analysis to do this if desired.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][dataflow] Propagate storage location of compound assignment operators. (#94332)</title>
<updated>2024-06-04T15:08:20+00:00</updated>
<author>
<name>martinboehme</name>
<email>mboehme@google.com</email>
</author>
<published>2024-06-04T15:08:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=492417278d986ddd8206b2b9bba626ce690ea244'/>
<id>492417278d986ddd8206b2b9bba626ce690ea244</id>
<content type='text'>
To avoid generating unnecessary values, we don't create a new value but
instead
leave it to the specific analysis to do this if desired.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To avoid generating unnecessary values, we don't create a new value but
instead
leave it to the specific analysis to do this if desired.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][nullability] Propagate storage location / value of `++`/`--` operators. (#94217)</title>
<updated>2024-06-04T06:32:29+00:00</updated>
<author>
<name>martinboehme</name>
<email>mboehme@google.com</email>
</author>
<published>2024-06-04T06:32:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=68761a9e05693bd3986e46628e401c80a27e945d'/>
<id>68761a9e05693bd3986e46628e401c80a27e945d</id>
<content type='text'>
To avoid generating unnecessary values, we don't create a new value but
instead
leave it to the specific analysis to do this if desired.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To avoid generating unnecessary values, we don't create a new value but
instead
leave it to the specific analysis to do this if desired.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][dataflow] Strengthen pointer comparison. (#75170)</title>
<updated>2024-05-07T08:12:23+00:00</updated>
<author>
<name>martinboehme</name>
<email>mboehme@google.com</email>
</author>
<published>2024-05-07T08:12:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f3fbd21fa4e25496725c22d987e4e47e4c39c8b0'/>
<id>f3fbd21fa4e25496725c22d987e4e47e4c39c8b0</id>
<content type='text'>
-  Instead of comparing the identity of the `PointerValue`s, compare the
   underlying `StorageLocation`s.

- If the `StorageLocation`s are the same, return a definite "true" as
the
result of the comparison. Before, if the `PointerValue`s were different,
we
would return an atom, even if the storage locations themselves were the
same.

- If the `StorageLocation`s are different, return an atom (as before).
Pointers
that have different storage locations may still alias, so we can't
return a
   definite "false" in this case.

The application-level gains from this are relatively modest. For the
Crubit
nullability check running on an internal codebase, this change reduces
the
number of functions on which the SAT solver times out from 223 to 221;
the
number of "pointer expression not modeled" errors reduces from 3815 to
3778.

Still, it seems that the gain in precision is generally worthwhile.

@Xazax-hun inspired me to think about this with his

[comments](https://github.com/llvm/llvm-project/pull/73860#pullrequestreview-1761484615)
on a different PR.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
-  Instead of comparing the identity of the `PointerValue`s, compare the
   underlying `StorageLocation`s.

- If the `StorageLocation`s are the same, return a definite "true" as
the
result of the comparison. Before, if the `PointerValue`s were different,
we
would return an atom, even if the storage locations themselves were the
same.

- If the `StorageLocation`s are different, return an atom (as before).
Pointers
that have different storage locations may still alias, so we can't
return a
   definite "false" in this case.

The application-level gains from this are relatively modest. For the
Crubit
nullability check running on an internal codebase, this change reduces
the
number of functions on which the SAT solver times out from 223 to 221;
the
number of "pointer expression not modeled" errors reduces from 3815 to
3778.

Still, it seems that the gain in precision is generally worthwhile.

@Xazax-hun inspired me to think about this with his

[comments](https://github.com/llvm/llvm-project/pull/73860#pullrequestreview-1761484615)
on a different PR.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][dataflow] Fix crash when `operator=` result type is not destination type. (#90898)</title>
<updated>2024-05-06T06:15:12+00:00</updated>
<author>
<name>martinboehme</name>
<email>mboehme@google.com</email>
</author>
<published>2024-05-06T06:15:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0348e71885ee8c07e1ae789059ff6d3c9ffce596'/>
<id>0348e71885ee8c07e1ae789059ff6d3c9ffce596</id>
<content type='text'>
The existing code was full of comments about how we assume this is
always the
case, but it's not mandated by the standard, and there is code out there
that
returns a different type. So check that the result type is in fact the
same as
the destination type before attempting to copy to the result.

To make sure that we don't bail out in more cases than intended, I've
extended
existing tests to verify that in the common case, we do return the
destination
object (by reference or value, as the case may be).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The existing code was full of comments about how we assume this is
always the
case, but it's not mandated by the standard, and there is code out there
that
returns a different type. So check that the result type is in fact the
same as
the destination type before attempting to copy to the result.

To make sure that we don't bail out in more cases than intended, I've
extended
existing tests to verify that in the common case, we do return the
destination
object (by reference or value, as the case may be).</pre>
</div>
</content>
</entry>
</feed>
