[PATCH] D97183: [analyzer] Add NoteTag for smart-ptr get()
Deep Majumder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 22 23:49:34 PDT 2021
RedDocMD added a comment.
@NoQ, I have taken a different approach this time. I have used a visitor and am storing some more data in the GDM. Together, they distinguish between the following three cases:
1. If the raw pointer obtained from get() is constrained to null in a path which leads to a Node (and thus State) where a smart-pointer-null-deref bug occurs.
2. If the raw pointer was null to begin with (because the smart-pointer was null)
3. If the raw pointer was not null to begin with but the smart-ptr became null after that.
Only in the first case should the note be emitted. I have added some more tests to that effect.
Can you please have a look at this?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97183/new/
https://reviews.llvm.org/D97183
More information about the cfe-commits
mailing list