We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfa3ed9 commit 721d52fCopy full SHA for 721d52f
lib/AST/Decl.cpp
@@ -2034,11 +2034,11 @@ SourceLoc PatternBindingDecl::getEqualLoc(unsigned i) const {
2034
}
2035
2036
SourceLoc TopLevelCodeDecl::getStartLoc() const {
2037
- return Body->getStartLoc();
+ return Body ? Body->getStartLoc() : SourceLoc();
2038
2039
2040
SourceRange TopLevelCodeDecl::getSourceRange() const {
2041
- return Body->getSourceRange();
+ return Body? Body->getSourceRange() : SourceRange();
2042
2043
2044
SourceRange IfConfigDecl::getSourceRange() const {
0 commit comments