[clang] Unknown array lvalue element (PR #133381)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 28 04:04:03 PDT 2025
================
@@ -39,14 +39,9 @@ int assumingBothPointerToMiddle(int arg) {
// will speak about the "byte offset" measured from the beginning of the TenElements.
int *p = TenElements + 2;
int a = p[arg];
- // FIXME: The following note does not appear:
- // {{Assuming byte offset is non-negative and less than 40, the extent of 'TenElements'}}
- // It seems that the analyzer "gives up" modeling this pointer arithmetics
- // and says that `p[arg]` is just an UnknownVal (instead of calculating that
- // it's equivalent to `TenElements[2+arg]`).
+ // expected-note at -1 {{Assuming byte offset is non-negative and less than 40, the extent of 'TenElements'}}
----------------
NagyDonat wrote:
I'm really happy to see that this FIXME is eliminated :smile:
https://github.com/llvm/llvm-project/pull/133381
More information about the cfe-commits
mailing list