summaryrefslogtreecommitdiff
path: root/clang/test/Analysis/uninit-structured-binding-array.cpp
AgeCommit message (Collapse)Author
2025-02-26[analyzer] Update the undefined assignment checker diagnostics to not use ↵David Tarditi
the term 'garbage' (#126596) 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
2022-07-26[analyzer] ArrayInitLoopExpr with array of non-POD typeisuckatcs
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
2022-06-23[analyzer] Structured binding to arraysisuckatcs
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