Skip to content

Commit

Permalink
[analyzer] Fix wrong annotation of PointerToMemberData
Browse files Browse the repository at this point in the history
Unfortunately I don't have a reproducer for this.
Reported by @mikaelholmen!

Differential Revision: https://reviews.llvm.org/D126198
  • Loading branch information
Balazs Benics committed Jun 1, 2022
1 parent de2b543 commit 3a07280
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -90,9 +90,7 @@ class PointerToMemberData : public llvm::FoldingSetNode {
public:
PointerToMemberData(const NamedDecl *D,
llvm::ImmutableList<const CXXBaseSpecifier *> L)
: D(D), L(L) {
assert(D);
}
: D(D), L(L) {}

using iterator = llvm::ImmutableList<const CXXBaseSpecifier *>::iterator;

Expand All @@ -104,7 +102,7 @@ class PointerToMemberData : public llvm::FoldingSetNode {

void Profile(llvm::FoldingSetNodeID &ID) { Profile(ID, D, L); }

LLVM_ATTRIBUTE_RETURNS_NONNULL
/// It might return null.
const NamedDecl *getDeclaratorDecl() const { return D; }

llvm::ImmutableList<const CXXBaseSpecifier *> getCXXBaseList() const {
Expand Down

0 comments on commit 3a07280

Please sign in to comment.