[clang] [clang][analyzer] Extend lifetime of dynamic extent information (PR #163562)
Balázs Kéri via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 10 08:50:43 PST 2025
================
@@ -381,30 +381,12 @@ int *symbolicExtent(int arg) {
return 0;
int *mem = (int*)malloc(arg);
- // TODO: without the following reference to 'arg', the analyzer would discard
- // the range information about (the symbolic value of) 'arg'. This is
- // incorrect because while the variable itself is inaccessible, it becomes
- // the symbolic extent of 'mem', so we still want to reason about its
- // potential values.
- (void)arg;
----------------
balazske wrote:
I checked the Analysis tests but did not find similar casts (for purpose of keeping constraints of dynamic extent), just one place (that is changed in the last commit).
https://github.com/llvm/llvm-project/pull/163562
More information about the cfe-commits
mailing list