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 3e8b3e8 commit a69813fCopy full SHA for a69813f
lib/AST/RawComment.cpp
@@ -156,6 +156,11 @@ RawComment Decl::getRawComment(bool SerializedOK) const {
156
for (const auto &Range : CachedLocs->DocRanges) {
157
if (Range.isValid()) {
158
SRCs.push_back({ Range, Context.SourceMgr });
159
+ } else {
160
+ // if we've run into an invalid range, don't bother trying to load any of
161
+ // the other comments
162
+ SRCs.clear();
163
+ break;
164
}
165
166
auto RC = RawComment(Context.AllocateCopy(llvm::makeArrayRef(SRCs)));
0 commit comments