<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/test/Analysis/nullptr.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>[analyzer] Model constructor initializer for an array member (#107537)</title>
<updated>2024-09-06T13:55:16+00:00</updated>
<author>
<name>Arseniy Zaostrovnykh</name>
<email>necto.ne@gmail.com</email>
</author>
<published>2024-09-06T13:55:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e4bb68b8717a20c5828b479f83c8648c2596e598'/>
<id>e4bb68b8717a20c5828b479f83c8648c2596e598</id>
<content type='text'>
Bind the array member to the compound region associated with the
initializer list, e.g.:

    class C {
      int arr[2];
      C() : arr{1, 2} {}
    };
    C c;

This change enables correct values in `c.arr[0]` and `c.arr[1]`

CPP-5647</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bind the array member to the compound region associated with the
initializer list, e.g.:

    class C {
      int arr[2];
      C() : arr{1, 2} {}
    };
    C c;

This change enables correct values in `c.arr[0]` and `c.arr[1]`

CPP-5647</pre>
</div>
</content>
</entry>
<entry>
<title>Reland "[analyzer] Deprecate `-analyzer-store region` flag"</title>
<updated>2022-06-14T07:20:41+00:00</updated>
<author>
<name>Balazs Benics</name>
<email>balazs.benics@sigmatechnology.se</email>
</author>
<published>2022-06-14T07:20:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ffe7950ebc62380c3afc7c71f454a1db3f6f5c76'/>
<id>ffe7950ebc62380c3afc7c71f454a1db3f6f5c76</id>
<content type='text'>
I'm trying to remove unused options from the `Analyses.def` file, then
merge the rest of the useful options into the `AnalyzerOptions.def`.
Then make sure one can set these by an `-analyzer-config XXX=YYY` style
flag.
Then surface the `-analyzer-config` to the `clang` frontend;

After all of this, we can pursue the tablegen approach described
https://discourse.llvm.org/t/rfc-tablegen-clang-static-analyzer-engine-options-for-better-documentation/61488

In this patch, I'm proposing flag deprecations.
We should support deprecated analyzer flags for exactly one release. In
this case I'm planning to drop this flag in `clang-16`.

In the clang frontend, now we won't pass this option to the cc1
frontend, rather emit a warning diagnostic reminding the users about
this deprecated flag, which will be turned into error in clang-16.

Unfortunately, I had to remove all the tests referring to this flag,
causing a mass change. I've also added a test for checking this warning.

I've seen that `scan-build` also uses this flag, but I think we should
remove that part only after we turn this into a hard error.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D126215
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I'm trying to remove unused options from the `Analyses.def` file, then
merge the rest of the useful options into the `AnalyzerOptions.def`.
Then make sure one can set these by an `-analyzer-config XXX=YYY` style
flag.
Then surface the `-analyzer-config` to the `clang` frontend;

After all of this, we can pursue the tablegen approach described
https://discourse.llvm.org/t/rfc-tablegen-clang-static-analyzer-engine-options-for-better-documentation/61488

In this patch, I'm proposing flag deprecations.
We should support deprecated analyzer flags for exactly one release. In
this case I'm planning to drop this flag in `clang-16`.

In the clang frontend, now we won't pass this option to the cc1
frontend, rather emit a warning diagnostic reminding the users about
this deprecated flag, which will be turned into error in clang-16.

Unfortunately, I had to remove all the tests referring to this flag,
causing a mass change. I've also added a test for checking this warning.

I've seen that `scan-build` also uses this flag, but I think we should
remove that part only after we turn this into a hard error.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D126215
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[analyzer] Deprecate `-analyzer-store region` flag"</title>
<updated>2022-06-10T12:50:13+00:00</updated>
<author>
<name>Nico Weber</name>
<email>thakis@chromium.org</email>
</author>
<published>2022-06-10T12:36:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8406839d1926486de900c7cabeea9f841bd3edf2'/>
<id>8406839d1926486de900c7cabeea9f841bd3edf2</id>
<content type='text'>
This reverts commit d50d9946d1d7e5f20881f0bc71fbd025040b1c96.
Broke check-clang, see comments on https://reviews.llvm.org/D126067

Also revert dependent change "[analyzer] Deprecate the unused 'analyzer-opt-analyze-nested-blocks' cc1 flag"
This reverts commit 07b4a6d0461fe64e10d30029ed3d598e49ca3810.

Also revert "[analyzer] Fix buildbots after introducing a new frontend warning"
This reverts commit 90374df15ddc58d823ca42326a76f58e748f20eb.
(See https://reviews.llvm.org/rG90374df15ddc58d823ca42326a76f58e748f20eb)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit d50d9946d1d7e5f20881f0bc71fbd025040b1c96.
Broke check-clang, see comments on https://reviews.llvm.org/D126067

Also revert dependent change "[analyzer] Deprecate the unused 'analyzer-opt-analyze-nested-blocks' cc1 flag"
This reverts commit 07b4a6d0461fe64e10d30029ed3d598e49ca3810.

Also revert "[analyzer] Fix buildbots after introducing a new frontend warning"
This reverts commit 90374df15ddc58d823ca42326a76f58e748f20eb.
(See https://reviews.llvm.org/rG90374df15ddc58d823ca42326a76f58e748f20eb)
</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer] Deprecate `-analyzer-store region` flag</title>
<updated>2022-06-10T10:57:15+00:00</updated>
<author>
<name>Balazs Benics</name>
<email>balazs.benics@sigmatechnology.se</email>
</author>
<published>2022-06-10T10:57:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d50d9946d1d7e5f20881f0bc71fbd025040b1c96'/>
<id>d50d9946d1d7e5f20881f0bc71fbd025040b1c96</id>
<content type='text'>
I'm trying to remove unused options from the `Analyses.def` file, then
merge the rest of the useful options into the `AnalyzerOptions.def`.
Then make sure one can set these by an `-analyzer-config XXX=YYY` style
flag.
Then surface the `-analyzer-config` to the `clang` frontend;

After all of this, we can pursue the tablegen approach described
https://discourse.llvm.org/t/rfc-tablegen-clang-static-analyzer-engine-options-for-better-documentation/61488

In this patch, I'm proposing flag deprecations.
We should support deprecated analyzer flags for exactly one release. In
this case I'm planning to drop this flag in `clang-16`.

In the clang frontend, now we won't pass this option to the cc1
frontend, rather emit a warning diagnostic reminding the users about
this deprecated flag, which will be turned into error in clang-16.

Unfortunately, I had to remove all the tests referring to this flag,
causing a mass change. I've also added a test for checking this warning.

I've seen that `scan-build` also uses this flag, but I think we should
remove that part only after we turn this into a hard error.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D126215
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I'm trying to remove unused options from the `Analyses.def` file, then
merge the rest of the useful options into the `AnalyzerOptions.def`.
Then make sure one can set these by an `-analyzer-config XXX=YYY` style
flag.
Then surface the `-analyzer-config` to the `clang` frontend;

After all of this, we can pursue the tablegen approach described
https://discourse.llvm.org/t/rfc-tablegen-clang-static-analyzer-engine-options-for-better-documentation/61488

In this patch, I'm proposing flag deprecations.
We should support deprecated analyzer flags for exactly one release. In
this case I'm planning to drop this flag in `clang-16`.

In the clang frontend, now we won't pass this option to the cc1
frontend, rather emit a warning diagnostic reminding the users about
this deprecated flag, which will be turned into error in clang-16.

Unfortunately, I had to remove all the tests referring to this flag,
causing a mass change. I've also added a test for checking this warning.

I've seen that `scan-build` also uses this flag, but I think we should
remove that part only after we turn this into a hard error.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D126215
</pre>
</div>
</content>
</entry>
<entry>
<title>[Analyzer] Track RValue expressions</title>
<updated>2021-03-30T12:48:38+00:00</updated>
<author>
<name>Gabor Marton</name>
<email>gabor.marton@ericsson.com</email>
</author>
<published>2021-03-25T14:40:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=efa7df1682c2859dabe3646ee7dc01e68629417f'/>
<id>efa7df1682c2859dabe3646ee7dc01e68629417f</id>
<content type='text'>
It makes sense to track rvalue expressions in the case of special
concrete integer values. The most notable special value is zero (later
we may find other values). By tracking the origin of 0, we can provide a
better explanation for users e.g. in case of division by 0 warnings.
When the divisor is a product of a multiplication then now we can show
which operand (or both) was (were) zero and why.

Differential Revision: https://reviews.llvm.org/D99344
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It makes sense to track rvalue expressions in the case of special
concrete integer values. The most notable special value is zero (later
we may find other values). By tracking the origin of 0, we can provide a
better explanation for users e.g. in case of division by 0 warnings.
When the divisor is a product of a multiplication then now we can show
which operand (or both) was (were) zero and why.

Differential Revision: https://reviews.llvm.org/D99344
</pre>
</div>
</content>
</entry>
<entry>
<title>PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type</title>
<updated>2019-06-14T17:46:38+00:00</updated>
<author>
<name>Richard Smith</name>
<email>richard-llvm@metafoo.co.uk</email>
</author>
<published>2019-06-14T17:46:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=27252a1f9546ba379b76176d6f6707a1ae8d05cd'/>
<id>27252a1f9546ba379b76176d6f6707a1ae8d05cd</id>
<content type='text'>
nullptr_t does not access memory.

We now reuse CK_NullToPointer to represent a conversion from a glvalue
of type nullptr_t to a prvalue of nullptr_t where necessary.

This reinstates r363337, reverted in r363352.

llvm-svn: 363429
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
nullptr_t does not access memory.

We now reuse CK_NullToPointer to represent a conversion from a glvalue
of type nullptr_t to a prvalue of nullptr_t where necessary.

This reinstates r363337, reverted in r363352.

llvm-svn: 363429
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert 363295, it caused PR42276. Also revert follow-ups 363337, 363340.</title>
<updated>2019-06-14T04:05:17+00:00</updated>
<author>
<name>Nico Weber</name>
<email>nicolasweber@gmx.de</email>
</author>
<published>2019-06-14T04:05:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3d02b895eda08dda749a16c9499f3a11fd68793b'/>
<id>3d02b895eda08dda749a16c9499f3a11fd68793b</id>
<content type='text'>
Revert 363340 "Remove unused SK_LValueToRValue initialization step."
Revert 363337 "PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type"
Revert 363295 "C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression."

llvm-svn: 363352
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Revert 363340 "Remove unused SK_LValueToRValue initialization step."
Revert 363337 "PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type"
Revert 363295 "C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression."

llvm-svn: 363352
</pre>
</div>
</content>
</entry>
<entry>
<title>PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type</title>
<updated>2019-06-13T23:31:04+00:00</updated>
<author>
<name>Richard Smith</name>
<email>richard-llvm@metafoo.co.uk</email>
</author>
<published>2019-06-13T23:31:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0476d069e394fec587858985ddee870360aec1ee'/>
<id>0476d069e394fec587858985ddee870360aec1ee</id>
<content type='text'>
nullptr_t does not access memory.

We now reuse CK_NullToPointer to represent a conversion from a glvalue
of type nullptr_t to a prvalue of nullptr_t where necessary.

This reinstates r345562, reverted in r346065, now that CodeGen's
handling of non-odr-used variables has been fixed.

llvm-svn: 363337
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
nullptr_t does not access memory.

We now reuse CK_NullToPointer to represent a conversion from a glvalue
of type nullptr_t to a prvalue of nullptr_t where necessary.

This reinstates r345562, reverted in r346065, now that CodeGen's
handling of non-odr-used variables has been fixed.

llvm-svn: 363337
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Add extension to always default-initialize nullptr_t."</title>
<updated>2018-12-14T22:41:18+00:00</updated>
<author>
<name>Erich Keane</name>
<email>erich.keane@intel.com</email>
</author>
<published>2018-12-14T22:41:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1b9c746034f15aca6039d2369068346f09a2d62f'/>
<id>1b9c746034f15aca6039d2369068346f09a2d62f</id>
<content type='text'>
This reverts commit 46efdf2ccc2a80aefebf8433dbf9c7c959f6e629.

Richard Smith commented just after I submitted this that this is the
wrong solution.  Reverting so that I can fix differently.

llvm-svn: 349206
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 46efdf2ccc2a80aefebf8433dbf9c7c959f6e629.

Richard Smith commented just after I submitted this that this is the
wrong solution.  Reverting so that I can fix differently.

llvm-svn: 349206
</pre>
</div>
</content>
</entry>
<entry>
<title>Add extension to always default-initialize nullptr_t.</title>
<updated>2018-12-14T22:22:29+00:00</updated>
<author>
<name>Erich Keane</name>
<email>erich.keane@intel.com</email>
</author>
<published>2018-12-14T22:22:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=07325c80d9bc8060ac1e7dceabeecfcb141146bf'/>
<id>07325c80d9bc8060ac1e7dceabeecfcb141146bf</id>
<content type='text'>
Core issue 1013 suggests that having an uninitialied std::nullptr_t be
UB is a bit foolish, since there is only a single valid value. This DR
reports that DR616 fixes it, which does so by making lvalue-to-rvalue
conversions from nullptr_t be equal to nullptr.

However, just implementing that results in warnings/etc in many places.
In order to fix all situations where nullptr_t would seem uninitialized,
this patch instead (as an otherwise transparent extension) default
initializes uninitialized VarDecls of nullptr_t.

Differential Revision: https://reviews.llvm.org/D53713

Change-Id: I84d72a9290054fa55341e8cbdac43c8e7f25b885
llvm-svn: 349201
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Core issue 1013 suggests that having an uninitialied std::nullptr_t be
UB is a bit foolish, since there is only a single valid value. This DR
reports that DR616 fixes it, which does so by making lvalue-to-rvalue
conversions from nullptr_t be equal to nullptr.

However, just implementing that results in warnings/etc in many places.
In order to fix all situations where nullptr_t would seem uninitialized,
this patch instead (as an otherwise transparent extension) default
initializes uninitialized VarDecls of nullptr_t.

Differential Revision: https://reviews.llvm.org/D53713

Change-Id: I84d72a9290054fa55341e8cbdac43c8e7f25b885
llvm-svn: 349201
</pre>
</div>
</content>
</entry>
</feed>
