[PATCH] D153132: [clang analysis][NFCI] Preparatory work for D153131.
Clement Courbet via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 27 01:17:49 PDT 2023
courbet added a comment.
In D153132#4647557 <https://reviews.llvm.org/D153132#4647557>, @aaronpuchert wrote:
> In D153132#4431627 <https://reviews.llvm.org/D153132#4431627>, @courbet wrote:
>
>>> Is this actually required for the subsequent change? I don't see the connection.
>>
>> In the followup change, we have to check the returns after the enter and exit CFG block are computed. We can't analyze the returns as they are seen because , because what matters for the returns is the locks that are live at the end of the function, not those that are live at the point where the `return` happens.
>
> Is this still the case? Or do we not need this anymore.
So the change we still actually need is for `checkAccess()` to take the fact set as a parameter (because we're checking two different fact sets depending on whether we're processing a return statement or not). I think that design-wise it's better if `checkAccess` is in the `Analyzer` rather than the `BuildLockset`, because `checkAccess()` no longer needs access to any state within `BuildLockset`.
>> From a design perspective I think it might actually make more sens for them to be in the analyzer as `warnIfMutexNotHeld` and friends actually inspects quite a lot of the `Analyzer` state.
>
> On that I agree.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153132/new/
https://reviews.llvm.org/D153132
More information about the cfe-commits
mailing list