summaryrefslogtreecommitdiff
path: root/clang/test/Analysis/ctor-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
2024-09-06[analyzer] Model constructor initializer for an array member (#107537)Arseniy Zaostrovnykh
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
2024-07-25[analyzer][NFC] Minor cleanup in two test files. (#100570)Donát Nagy
This commit contains two unrelated trivial changes: (1) Three unused variables are removed from `ctor.mm`. (2) A FIXME block is removed from `ctor-array.cpp` because it described an issue that was resolved since then.
2022-07-14[analyzer] Evaluate construction of non-POD type arraysisuckatcs
Introducing the support for evaluating the constructor of every element in an array. The idea is to record the index of the current array member being constructed and create a loop during the analysis. We looping over the same CXXConstructExpr as many times as many elements the array has. Differential Revision: https://reviews.llvm.org/D127973