<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp, branch users/ojhunt/ptrauth-additions</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>[NFCI][analyzer] Make CallEvent::getState protected (#162673)</title>
<updated>2025-10-18T21:00:46+00:00</updated>
<author>
<name>Donát Nagy</name>
<email>donat.nagy@ericsson.com</email>
</author>
<published>2025-10-18T21:00:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0f6f13bdccd3345522b7d38294a72b802b6ffc28'/>
<id>0f6f13bdccd3345522b7d38294a72b802b6ffc28</id>
<content type='text'>
`CallEvent` instances have a reference to a state object instead having
separate data members for storing the arguments (as `SVal` instances),
the return value (as `SVal`, if available), the dynamic type information
and similar things.

Previously this state was publicly available, which meant that many
checker callbacks had two ways to access the state: either through the
`CallEvent` or through the `CheckerContext`. This redundancy is
inelegant and bugprone (e.g. the recent commit
6420da68972782c37c4f147409dadcb970583d9e fixed a situation where the
state attached to the `CallEvent` could be obsolete in `EvalCall` and
`PointerEscape` callbacks), so this commit limits access to the state
attached to a `CallEvent` and turns it into a protected implementation
detail.

In the future it may be a good idea to completely remove the state
instance from the `CallEvent` and explicitly store the few parts of the
state which are relevant for the call and do not change during the
evaluation of the call.

In theory this commit should be a non-functional change (because AFAIK
the `CallEvent` and `CheckerContext` provide the same state after the
recent fix), but there is a small chance that it fixes some bugs that I
do not know about.

---------

Co-authored-by: Artem Dergachev &lt;noqnoqneo@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`CallEvent` instances have a reference to a state object instead having
separate data members for storing the arguments (as `SVal` instances),
the return value (as `SVal`, if available), the dynamic type information
and similar things.

Previously this state was publicly available, which meant that many
checker callbacks had two ways to access the state: either through the
`CallEvent` or through the `CheckerContext`. This redundancy is
inelegant and bugprone (e.g. the recent commit
6420da68972782c37c4f147409dadcb970583d9e fixed a situation where the
state attached to the `CallEvent` could be obsolete in `EvalCall` and
`PointerEscape` callbacks), so this commit limits access to the state
attached to a `CallEvent` and turns it into a protected implementation
detail.

In the future it may be a good idea to completely remove the state
instance from the `CallEvent` and explicitly store the few parts of the
state which are relevant for the call and do not change during the
evaluation of the call.

In theory this commit should be a non-functional change (because AFAIK
the `CallEvent` and `CheckerContext` provide the same state after the
recent fix), but there is a small chance that it fixes some bugs that I
do not know about.

---------

Co-authored-by: Artem Dergachev &lt;noqnoqneo@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][StaticAnalyzer] Avoid 'raw_string_ostream::str' (NFC)</title>
<updated>2024-07-03T00:52:09+00:00</updated>
<author>
<name>Youngsuk Kim</name>
<email>youngsuk.kim@hpe.com</email>
</author>
<published>2024-07-02T16:38:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0856064ea219d029e7d2c4f68bb88196fe647f6b'/>
<id>0856064ea219d029e7d2c4f68bb88196fe647f6b</id>
<content type='text'>
Since `raw_string_ostream` doesn't own the string buffer, it is
desirable (in terms of memory safety) for users to directly reference
the string buffer rather than use `raw_string_ostream::str()`.

Work towards TODO comment to remove `raw_string_ostream::str()`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since `raw_string_ostream` doesn't own the string buffer, it is
desirable (in terms of memory safety) for users to directly reference
the string buffer rather than use `raw_string_ostream::str()`.

Work towards TODO comment to remove `raw_string_ostream::str()`.
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][Clang] Improve const correctness for IdentifierInfo (#79365)</title>
<updated>2024-04-11T00:33:40+00:00</updated>
<author>
<name>Bill Wendling</name>
<email>5993918+bwendling@users.noreply.github.com</email>
</author>
<published>2024-04-11T00:33:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fca51911d4668b3a6b79eb956327eb81fad3f40c'/>
<id>fca51911d4668b3a6b79eb956327eb81fad3f40c</id>
<content type='text'>
The IdentifierInfo isn't typically modified. Use 'const' wherever
possible.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The IdentifierInfo isn't typically modified. Use 'const' wherever
possible.</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer][NFC] Cleanup BugType lazy-init patterns (#76655)</title>
<updated>2024-01-01T17:53:36+00:00</updated>
<author>
<name>Balazs Benics</name>
<email>benicsbalazs@gmail.com</email>
</author>
<published>2024-01-01T17:53:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=18f219c5ac8369ec3e46c4accbb19ca51dc8bc67'/>
<id>18f219c5ac8369ec3e46c4accbb19ca51dc8bc67</id>
<content type='text'>
Cleanup most of the lazy-init `BugType` legacy.
Some will be preserved, as those are slightly more complicated to
refactor.

Notice, that the default category for `BugType` is `LogicError`. I
omitted setting this explicitly where I could.

Please, actually have a look at the diff. I did this manually, and we
rarely check the bug type descriptions and stuff in tests, so the
testing might be shallow on this one.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cleanup most of the lazy-init `BugType` legacy.
Some will be preserved, as those are slightly more complicated to
refactor.

Notice, that the default category for `BugType` is `LogicError`. I
omitted setting this explicitly where I could.

Please, actually have a look at the diff. I did this manually, and we
rarely check the bug type descriptions and stuff in tests, so the
testing might be shallow on this one.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Use StringRef::{starts,ends}_with (NFC) (#75149)</title>
<updated>2023-12-13T16:54:13+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2023-12-13T16:54:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f3dcc2351cff7b26c9870d737e5d431551542d9e'/>
<id>f3dcc2351cff7b26c9870d737e5d431551542d9e</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] Initialize class member pointers to nullptr.</title>
<updated>2023-07-10T18:38:55+00:00</updated>
<author>
<name>Sindhu Chittireddy</name>
<email>sindhu.chittireddy@intel.com</email>
</author>
<published>2023-06-27T22:24:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5942ae8681db20822ac3e0b94cf8089d30647a39'/>
<id>5942ae8681db20822ac3e0b94cf8089d30647a39</id>
<content type='text'>
Reviewed here: https://reviews.llvm.org/D153926
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed here: https://reviews.llvm.org/D153926
</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer][NFC] Move away from using raw-for loops inside StaticAnalyzer</title>
<updated>2023-07-05T06:56:13+00:00</updated>
<author>
<name>Balazs Benics</name>
<email>benicsbalazs@gmail.com</email>
</author>
<published>2023-07-05T06:56:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5c23e27ba19c566b114f8a89a856f1d08238fa96'/>
<id>5c23e27ba19c566b114f8a89a856f1d08238fa96</id>
<content type='text'>
I'm involved with the Static Analyzer for the most part.
I think we should embrace newer language standard features and gradually
move forward.

Differential Revision: https://reviews.llvm.org/D154325
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I'm involved with the Static Analyzer for the most part.
I think we should embrace newer language standard features and gradually
move forward.

Differential Revision: https://reviews.llvm.org/D154325
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] Fix potential dereferencing of null return value.</title>
<updated>2023-06-17T03:31:08+00:00</updated>
<author>
<name>Sindhu Chittireddy</name>
<email>sindhu.chittireddy@intel.com</email>
</author>
<published>2023-06-13T21:37:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c2888cddd5d98081fc82c51cb92be241144c6ffa'/>
<id>c2888cddd5d98081fc82c51cb92be241144c6ffa</id>
<content type='text'>
Replace getAs with castAs and add assert if needed.
Differential Revision: https://reviews.llvm.org/D152977
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace getAs with castAs and add assert if needed.
Differential Revision: https://reviews.llvm.org/D152977
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Use std::optional instead of llvm::Optional (NFC)</title>
<updated>2023-01-14T20:31:01+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2023-01-14T20:31:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6ad0788c332bb2043142954d300c49ac3e537f34'/>
<id>6ad0788c332bb2043142954d300c49ac3e537f34</id>
<content type='text'>
This patch replaces (llvm::|)Optional&lt; with std::optional&lt;.  I'll post
a separate patch to remove #include "llvm/ADT/Optional.h".

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch replaces (llvm::|)Optional&lt; with std::optional&lt;.  I'll post
a separate patch to remove #include "llvm/ADT/Optional.h".

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Add #include &lt;optional&gt; (NFC)</title>
<updated>2023-01-14T19:07:21+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2023-01-14T19:07:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a1580d7b59b65b17f2ce7fdb95f46379e7df4089'/>
<id>a1580d7b59b65b17f2ce7fdb95f46379e7df4089</id>
<content type='text'>
This patch adds #include &lt;optional&gt; to those files containing
llvm::Optional&lt;...&gt; or Optional&lt;...&gt;.

I'll post a separate patch to actually replace llvm::Optional with
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds #include &lt;optional&gt; to those files containing
llvm::Optional&lt;...&gt; or Optional&lt;...&gt;.

I'll post a separate patch to actually replace llvm::Optional with
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
</pre>
</div>
</content>
</entry>
</feed>
