[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)
Valeriy Savchenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 12 03:35:43 PDT 2021
vsavchenko added a comment.
In D99260#2751967 <https://reviews.llvm.org/D99260#2751967>, @steakhal wrote:
> In D99260#2704102 <https://reviews.llvm.org/D99260#2704102>, @NoQ wrote:
>
>> In https://bugs.llvm.org/show_bug.cgi?id=45786 the godbolt link shows that there are still problems with `addressof` (yes, their "trunk" clang is fresh enough). They seem to have `__addressof` instead of `addressof` so maybe we should cover that case real quick. Or maybe outright suppress reference invalidation on double-underscore functions because the checker generally relies on the number of standard functions that don't invalidate references while taking a non-const reference being very limited but this limit definitely doesn't take double-underscore functions into account.
>
> What is the status quo of this issue? @vsavchenko
Ah, yep. Just got back from my vacation!
I'm not sure about shooting off double underscore functions because one never knows what weird coding conventions people have in their project (all TU-local static functions should be named like this for better visibility at their call sites, for example). Being more specific and dealing with `std::__` can be better, but I think a quick hack specifically for `std::__addressof` is better atm.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99260/new/
https://reviews.llvm.org/D99260
More information about the cfe-commits
mailing list