Skip to content

Commit 86c7857

Browse files
authored
Merge pull request #33625 from bnbarham/pass-reference-nullptr
[IDE] Skip visiting constructor references when the decl is unknown
2 parents 8c56ce8 + b4fb7d0 commit 86c7857

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/IDE/SourceEntityWalker.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,12 @@ passReference(ValueDecl *D, Type Ty, SourceLoc BaseNameLoc, SourceRange Range,
715715
}
716716
}
717717

718+
if (D == nullptr) {
719+
// FIXME: When does this happen?
720+
assert(false && "unhandled reference");
721+
return true;
722+
}
723+
718724
CharSourceRange CharRange =
719725
Lexer::getCharSourceRangeFromSourceRange(D->getASTContext().SourceMgr,
720726
Range);

0 commit comments

Comments
 (0)