<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp, branch users/koachan/spr/main.sparcias-enable-parseforallfeatures-in-matchoperandparserimpl</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>[clang][dataflow] Handle `AtomicExpr` in `ResultObjectVisitor`. (#94963)</title>
<updated>2024-06-11T06:38:03+00:00</updated>
<author>
<name>martinboehme</name>
<email>mboehme@google.com</email>
</author>
<published>2024-06-11T06:38:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=282534268e3be0949fcac1589b1004bc5672b434'/>
<id>282534268e3be0949fcac1589b1004bc5672b434</id>
<content type='text'>
This is one of the node kinds that should be considered an "original
initializer". The patch adds a test that was causing an assertion
failure in
`assert(Children.size() == 1)` without the fix.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is one of the node kinds that should be considered an "original
initializer". The patch adds a test that was causing an assertion
failure in
`assert(Children.size() == 1)` without the fix.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][dataflow] Rewrite `getReferencedDecls()` with a `RecursiveASTVisitor`. (#93461)</title>
<updated>2024-06-03T06:59:09+00:00</updated>
<author>
<name>martinboehme</name>
<email>mboehme@google.com</email>
</author>
<published>2024-06-03T06:59:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5161a3f6e5e92c78c33aed5e38e0680a1a9b088e'/>
<id>5161a3f6e5e92c78c33aed5e38e0680a1a9b088e</id>
<content type='text'>
We previously had a hand-rolled recursive traversal here that was
exactly what
`RecursiveASTVistor` does anyway. Using the visitor not only eliminates
the
explicit traversal logic but also allows us to introduce a common
visitor base
class for `getReferencedDecls()` and `ResultObjectVisitor`, ensuring
that the
two are consistent in terms of the nodes they visit. Inconsistency
between these
two has caused crashes in the past when `ResultObjectVisitor` tried to
propagate
result object locations to entities that weren't modeled becasue
`getReferencedDecls()` didn't visit them.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We previously had a hand-rolled recursive traversal here that was
exactly what
`RecursiveASTVistor` does anyway. Using the visitor not only eliminates
the
explicit traversal logic but also allows us to introduce a common
visitor base
class for `getReferencedDecls()` and `ResultObjectVisitor`, ensuring
that the
two are consistent in terms of the nodes they visit. Inconsistency
between these
two has caused crashes in the past when `ResultObjectVisitor` tried to
propagate
result object locations to entities that weren't modeled becasue
`getReferencedDecls()` didn't visit them.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][dataflow] Fully support Environment construction for Stmt analysis. (#91616)</title>
<updated>2024-05-15T20:11:11+00:00</updated>
<author>
<name>Samira Bazuzi</name>
<email>bazuzi@google.com</email>
</author>
<published>2024-05-15T20:11:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=80d9ae9cbf692a73404995a88665af7166c7e8ad'/>
<id>80d9ae9cbf692a73404995a88665af7166c7e8ad</id>
<content type='text'>
Assume in fewer places that the analysis is of a `FunctionDecl`, and
initialize the `Environment` properly for `Stmt`s.

Moves constructors for `Environment` to header to make it more obvious
that there are only minor differences between them and very little
initialization in the constructors.

Tested with check-clang-tooling.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Assume in fewer places that the analysis is of a `FunctionDecl`, and
initialize the `Environment` properly for `Stmt`s.

Moves constructors for `Environment` to header to make it more obvious
that there are only minor differences between them and very little
initialization in the constructors.

Tested with check-clang-tooling.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][dataflow] Don't propagate result objects in unevaluated contexts (reland #90438) (#91172)</title>
<updated>2024-05-06T12:21:15+00:00</updated>
<author>
<name>martinboehme</name>
<email>mboehme@google.com</email>
</author>
<published>2024-05-06T12:21:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4d839d8f18e41bd97e1c5e82d53ad5687c07e586'/>
<id>4d839d8f18e41bd97e1c5e82d53ad5687c07e586</id>
<content type='text'>
This relands #90348 with a fix for a [buildbot
failure](https://lab.llvm.org/buildbot/#/builders/216/builds/38446)
caused by the test being run with `-fno-rtti`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This relands #90348 with a fix for a [buildbot
failure](https://lab.llvm.org/buildbot/#/builders/216/builds/38446)
caused by the test being run with `-fno-rtti`.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[clang][dataflow] Don't propagate result objects in unevaluated contexts (#90438)"</title>
<updated>2024-05-02T10:51:45+00:00</updated>
<author>
<name>Weaver</name>
<email>Tom.Weaver@sony.com</email>
</author>
<published>2024-05-02T10:51:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2252c5c42b95dd12dda0c7fb1b2811f943b21949'/>
<id>2252c5c42b95dd12dda0c7fb1b2811f943b21949</id>
<content type='text'>
This reverts commit 597a3150e932a9423c65b5ea4b53dd431aff5865.

Caused test failure on the following buildbot:
https://lab.llvm.org/buildbot/#/builders/216/builds/38446
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 597a3150e932a9423c65b5ea4b53dd431aff5865.

Caused test failure on the following buildbot:
https://lab.llvm.org/buildbot/#/builders/216/builds/38446
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][dataflow] Don't propagate result objects in unevaluated contexts (#90438)</title>
<updated>2024-05-02T06:35:13+00:00</updated>
<author>
<name>martinboehme</name>
<email>mboehme@google.com</email>
</author>
<published>2024-05-02T06:35:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=597a3150e932a9423c65b5ea4b53dd431aff5865'/>
<id>597a3150e932a9423c65b5ea4b53dd431aff5865</id>
<content type='text'>
Trying to do so can cause crashes -- see newly added test and the
comments in
the fix.

We're starting to see a repeating pattern here: We're getting crashes
because
`ResultObjectVisitor` and `getReferencedDecls()` don't agree on which
parts of
the AST to visit and, hence, which fields should be modeled.

I think we should ensure consistency between these two parts of the code
by
using a `RecursiveASTVisitor` in `getReferencedDecls()`[^1]; the
`Traverse...()` functions that control which parts of the AST we visit
would go
in a common base class that would be used for both `ResultObjectVisitor`
and
`getReferencedDecls()`.

I'd like to focus this PR, however, on a targeted fix for the current
crash and
postpone the refactoring to a later PR (which will be easier to revert
if there
are unintended side-effects).

[^1]: As an added bonus, this would make the code better structured and
more
efficient than the current sequence of `if (dyn_cast&lt;T&gt;(...))`
statements).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Trying to do so can cause crashes -- see newly added test and the
comments in
the fix.

We're starting to see a repeating pattern here: We're getting crashes
because
`ResultObjectVisitor` and `getReferencedDecls()` don't agree on which
parts of
the AST to visit and, hence, which fields should be modeled.

I think we should ensure consistency between these two parts of the code
by
using a `RecursiveASTVisitor` in `getReferencedDecls()`[^1]; the
`Traverse...()` functions that control which parts of the AST we visit
would go
in a common base class that would be used for both `ResultObjectVisitor`
and
`getReferencedDecls()`.

I'd like to focus this PR, however, on a targeted fix for the current
crash and
postpone the refactoring to a later PR (which will be easier to revert
if there
are unintended side-effects).

[^1]: As an added bonus, this would make the code better structured and
more
efficient than the current sequence of `if (dyn_cast&lt;T&gt;(...))`
statements).</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][dataflow] Crash fix for `widenDistinctValues()`. (#89895)</title>
<updated>2024-04-25T07:24:08+00:00</updated>
<author>
<name>martinboehme</name>
<email>mboehme@google.com</email>
</author>
<published>2024-04-25T07:24:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b9208ce318907b1a5ea4ad0d2aa4414dfba0616c'/>
<id>b9208ce318907b1a5ea4ad0d2aa4414dfba0616c</id>
<content type='text'>
We used to crash if the previous iteration contained a `BoolValue` and
the
current iteration contained an `IntegerValue`. The accompanying test
sets up
this situation -- see comments there for details.

While I'm here, clean up the tests for integral casts to use the test
helpers we
have available now. I was looking at these tests to understand how we
handle
integral casts, and the test helpers make the tests easier to read.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We used to crash if the previous iteration contained a `BoolValue` and
the
current iteration contained an `IntegerValue`. The accompanying test
sets up
this situation -- see comments there for details.

While I'm here, clean up the tests for integral casts to use the test
helpers we
have available now. I was looking at these tests to understand how we
handle
integral casts, and the test helpers make the tests easier to read.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][dataflow] Don't propagate result objects in nested declarations. (#89903)</title>
<updated>2024-04-25T07:22:14+00:00</updated>
<author>
<name>martinboehme</name>
<email>mboehme@google.com</email>
</author>
<published>2024-04-25T07:22:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9b0651f5ae6510577302ea527b2cc79e80ec9ccc'/>
<id>9b0651f5ae6510577302ea527b2cc79e80ec9ccc</id>
<content type='text'>
Trying to do so can cause crashes -- see newly added test and the
comments in
the fix.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Trying to do so can cause crashes -- see newly added test and the
comments in
the fix.</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[clang][dataflow] Model conditional operator correctly." with fixes (#89596)</title>
<updated>2024-04-23T06:10:55+00:00</updated>
<author>
<name>martinboehme</name>
<email>mboehme@google.com</email>
</author>
<published>2024-04-23T06:10:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9ba6961ce05b17a70c22354f0b54a963ed1ab49c'/>
<id>9ba6961ce05b17a70c22354f0b54a963ed1ab49c</id>
<content type='text'>
I reverted https://github.com/llvm/llvm-project/pull/89213 beause it was
causing buildbots to fail with assertion failures.

Embarrassingly, it turns out I had been running tests locally in
`Release` mode, i.e. with `assert()` compiled away.

This PR re-lands #89213 with fixes for the failing assertions.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I reverted https://github.com/llvm/llvm-project/pull/89213 beause it was
causing buildbots to fail with assertion failures.

Embarrassingly, it turns out I had been running tests locally in
`Release` mode, i.e. with `assert()` compiled away.

This PR re-lands #89213 with fixes for the failing assertions.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[clang][dataflow] Model conditional operator correctly." (#89577)</title>
<updated>2024-04-22T07:35:29+00:00</updated>
<author>
<name>martinboehme</name>
<email>mboehme@google.com</email>
</author>
<published>2024-04-22T07:35:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8ff6434546bcb4602bd079f4161f746956905c60'/>
<id>8ff6434546bcb4602bd079f4161f746956905c60</id>
<content type='text'>
Reverts llvm/llvm-project#89213

This is causing buildbot failures.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#89213

This is causing buildbot failures.</pre>
</div>
</content>
</entry>
</feed>
