[clang] [analyzer] Do not reason about locations passed as inline asm input (PR #103714)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 14 05:37:53 PDT 2024
https://github.com/steakhal commented:
Looks good overall.
Please compactify the tests by removing newlines that are not strictly necessary.
It's a pitty that `ProgramState::invalidateRegions` accepts an `Expr` instead of a `Stmt` and then later inside it just conjures the result of the invalidation for a Stmt... That API really should have accepted Stmts. If that would be the case, we could just use something like this here:
```c++
state = state->invalidateRegions(EscapingValues, A, currBldrCtx->blockCount(),
Pred->getLocationContext(),
/*CausedByPointerEscape=*/true);
```
Note that this would be the correct way of doing this, as it would traverse all the reachable regions via those arguments, thus getting the pointee of a pointee also invalidated etc - unlike what we do now here.
Could you use `I` or `Input` for the input expression? I suppose `O` represented the `Output` expression in the previous loop.
https://github.com/llvm/llvm-project/pull/103714
More information about the cfe-commits
mailing list