[PATCH] D126198: [analyzer][NFCi] Annotate major nonnull returning functions

Mikael Holmén via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 1 04:46:45 PDT 2022


uabelho added a comment.

In D126198#3549790 <https://reviews.llvm.org/D126198#3549790>, @uabelho wrote:

> Hi,
>
> I see crashes like this with this patch:
>
>   clang: ../../clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:94: clang::ento::PointerToMemberData::PointerToMemberData(const clang::NamedDecl *, llvm::ImmutableList<const CXXBaseSpecifier *>): Assertion `D' failed.
>
> Anyhting known or familiar?
>
> Unfortunately I don't have any reproducer to share (yet).

Reproducer:

  clang -cc1 -analyze -analyzer-checker=core bbi-70461.C

on bbi-70461.C being

  class B{
  };
  
  class D: public B{
  };
  
  int f(int D::* pd);
  
  int test(void)
  {
    int B::* pb = 0;
  
    return f(pb);
  }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126198/new/

https://reviews.llvm.org/D126198



More information about the cfe-commits mailing list