[clang] [clang][analyzer] Extend lifetime of dynamic extent information (PR #163562)
Balázs Kéri via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 31 10:46:47 PDT 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 did not find more in the "ArrayBound" tests. Other tests may contain similar casts but this is more difficult to find.
https://github.com/llvm/llvm-project/pull/163562
More information about the cfe-commits
mailing list