<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/test/Analysis/array-init-loop.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] Update the undefined assignment checker diagnostics to not use the term 'garbage' (#126596)</title>
<updated>2025-02-26T12:57:33+00:00</updated>
<author>
<name>David Tarditi</name>
<email>d_tarditi@apple.com</email>
</author>
<published>2025-02-26T12:57:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8138d85f630726d2ddbf4a7950683c7db3853eb8'/>
<id>8138d85f630726d2ddbf4a7950683c7db3853eb8</id>
<content type='text'>
A clang user pointed out that messages for the static analyzer undefined
assignment checker use the term ‘garbage’, which might have a negative
connotation to some users. This change updates the messages to use the
term ‘uninitialized’. This is the usual reason why a value is undefined
in the static analyzer and describes the logical error that a programmer
should take action to fix.

Out-of-bounds reads can also produce undefined values in the static
analyzer. The right long-term design is to have to the array bounds
checker cover out-of-bounds reads, so we do not cover that case in the
updated messages. The recent improvements to the array bounds checker
make it a candidate to add to the core set of checkers.

rdar://133418644</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A clang user pointed out that messages for the static analyzer undefined
assignment checker use the term ‘garbage’, which might have a negative
connotation to some users. This change updates the messages to use the
term ‘uninitialized’. This is the usual reason why a value is undefined
in the static analyzer and describes the logical error that a programmer
should take action to fix.

Out-of-bounds reads can also produce undefined values in the static
analyzer. The right long-term design is to have to the array bounds
checker cover out-of-bounds reads, so we do not cover that case in the
updated messages. The recent improvements to the array bounds checker
make it a candidate to add to the core set of checkers.

rdar://133418644</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer] Fix a crash from element region construction during `ArrayInitLoopExpr` analysis (#113570)</title>
<updated>2024-10-26T15:41:55+00:00</updated>
<author>
<name>isuckatcs</name>
<email>65320245+isuckatcs@users.noreply.github.com</email>
</author>
<published>2024-10-26T15:41:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a917ae0b4fc0d792ee0e2c512c4ea539f98e1204'/>
<id>a917ae0b4fc0d792ee0e2c512c4ea539f98e1204</id>
<content type='text'>
This patch generalizes the way element regions are constructed when an
`ArrayInitLoopExpr` is being analyzed. Previously the base region of the
`ElementRegion` was determined with pattern matching, which led to
crashes, when an unhandled pattern was encountered.

Fixes #112813</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch generalizes the way element regions are constructed when an
`ArrayInitLoopExpr` is being analyzed. Previously the base region of the
`ElementRegion` was determined with pattern matching, which led to
crashes, when an unhandled pattern was encountered.

Fixes #112813</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer] Fix for incorrect handling of 0 length non-POD array construction</title>
<updated>2022-08-25T10:42:02+00:00</updated>
<author>
<name>isuckatcs</name>
<email>65320245+isuckatcs@users.noreply.github.com</email>
</author>
<published>2022-08-22T12:43:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e3e9082b013ba948e3df6d4a2536df9d04656e76'/>
<id>e3e9082b013ba948e3df6d4a2536df9d04656e76</id>
<content type='text'>
Prior to this patch when the analyzer encountered a non-POD 0 length array,
it still invoked the constructor for 1 element, which lead to false positives.
This patch makes sure that we no longer construct any elements when we see a
0 length array.

Differential Revision: https://reviews.llvm.org/D131501
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prior to this patch when the analyzer encountered a non-POD 0 length array,
it still invoked the constructor for 1 element, which lead to false positives.
This patch makes sure that we no longer construct any elements when we see a
0 length array.

Differential Revision: https://reviews.llvm.org/D131501
</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer] Handling non-POD multidimensional arrays in ArrayInitLoopExpr</title>
<updated>2022-08-22T11:53:53+00:00</updated>
<author>
<name>isuckatcs</name>
<email>65320245+isuckatcs@users.noreply.github.com</email>
</author>
<published>2022-08-13T13:41:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c81bf940c77ee9439eb1f63011e7ecf0e07c56d9'/>
<id>c81bf940c77ee9439eb1f63011e7ecf0e07c56d9</id>
<content type='text'>
This patch makes it possible for lambdas, implicit copy/move ctors
and structured bindings to handle non-POD multidimensional arrays.

Differential Revision: https://reviews.llvm.org/D131840
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch makes it possible for lambdas, implicit copy/move ctors
and structured bindings to handle non-POD multidimensional arrays.

Differential Revision: https://reviews.llvm.org/D131840
</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer] Lambda capture non-POD type array</title>
<updated>2022-07-26T07:40:25+00:00</updated>
<author>
<name>isuckatcs</name>
<email>65320245+isuckatcs@users.noreply.github.com</email>
</author>
<published>2022-07-17T17:04:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=996b092c5e170786572e925345e502e5376feaee'/>
<id>996b092c5e170786572e925345e502e5376feaee</id>
<content type='text'>
This patch introduces a new `ConstructionContext` for
lambda capture. This `ConstructionContext` allows the
analyzer to construct the captured object directly into
it's final region, and makes it possible to capture
non-POD arrays.

Differential Revision: https://reviews.llvm.org/D129967
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces a new `ConstructionContext` for
lambda capture. This `ConstructionContext` allows the
analyzer to construct the captured object directly into
it's final region, and makes it possible to capture
non-POD arrays.

Differential Revision: https://reviews.llvm.org/D129967
</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer] ArrayInitLoopExpr with array of non-POD type</title>
<updated>2022-07-26T07:07:22+00:00</updated>
<author>
<name>isuckatcs</name>
<email>65320245+isuckatcs@users.noreply.github.com</email>
</author>
<published>2022-07-17T16:25:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8a13326d184c2829a51d7c00f467ded06412f858'/>
<id>8a13326d184c2829a51d7c00f467ded06412f858</id>
<content type='text'>
This patch introduces the evaluation of ArrayInitLoopExpr
in case of structured bindings and implicit copy/move
constructor. The idea is to call the copy constructor for
every element in the array. The parameter of the copy
constructor is also manually selected, as it is not a part
of the CFG.

Differential Revision: https://reviews.llvm.org/D129496
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces the evaluation of ArrayInitLoopExpr
in case of structured bindings and implicit copy/move
constructor. The idea is to call the copy constructor for
every element in the array. The parameter of the copy
constructor is also manually selected, as it is not a part
of the CFG.

Differential Revision: https://reviews.llvm.org/D129496
</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer] Structured binding to arrays</title>
<updated>2022-06-23T09:38:21+00:00</updated>
<author>
<name>isuckatcs</name>
<email>65320245+isuckatcs@users.noreply.github.com</email>
</author>
<published>2022-06-08T21:23:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8ef628088b54aebd4a8317ce3a0029e3283b3aa0'/>
<id>8ef628088b54aebd4a8317ce3a0029e3283b3aa0</id>
<content type='text'>
Introducing structured binding to data members and more.
To handle binding to arrays, ArrayInitLoopExpr is also
evaluated, which enables the analyzer to store information
in two more cases. These are:
  - when a lambda-expression captures an array by value
  - in the implicit copy/move constructor for a class
    with an array member

Differential Revision: https://reviews.llvm.org/D126613
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introducing structured binding to data members and more.
To handle binding to arrays, ArrayInitLoopExpr is also
evaluated, which enables the analyzer to store information
in two more cases. These are:
  - when a lambda-expression captures an array by value
  - in the implicit copy/move constructor for a class
    with an array member

Differential Revision: https://reviews.llvm.org/D126613
</pre>
</div>
</content>
</entry>
</feed>
