Skip to content

Commit bc7f24c

Browse files
authored
[clang] [NFC] Remove SourceLocation() parameter from Diag.Report() calls in SourceManager, and use the equivalent Report() overload instead (llvm#116937)
1 parent ade0750 commit bc7f24c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/Basic/SourceManager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ SourceManager::createExpansionLocImpl(const ExpansionInfo &Info,
665665
LocalSLocEntryTable.push_back(SLocEntry::get(NextLocalOffset, Info));
666666
if (NextLocalOffset + Length + 1 <= NextLocalOffset ||
667667
NextLocalOffset + Length + 1 > CurrentLoadedOffset) {
668-
Diag.Report(SourceLocation(), diag::err_sloc_space_too_large);
668+
Diag.Report(diag::err_sloc_space_too_large);
669669
// FIXME: call `noteSLocAddressSpaceUsage` to report details to users and
670670
// use a source location from `Info` to point at an error.
671671
// Currently, both cause Clang to run indefinitely, this needs to be fixed.
@@ -2295,7 +2295,7 @@ void SourceManager::noteSLocAddressSpaceUsage(
22952295
uint64_t LoadedUsage = MaxLoadedOffset - CurrentLoadedOffset;
22962296
int UsagePercent = static_cast<int>(100.0 * double(LocalUsage + LoadedUsage) /
22972297
MaxLoadedOffset);
2298-
Diag.Report(SourceLocation(), diag::note_total_sloc_usage)
2298+
Diag.Report(diag::note_total_sloc_usage)
22992299
<< LocalUsage << LoadedUsage << (LocalUsage + LoadedUsage)
23002300
<< UsagePercent;
23012301

@@ -2311,7 +2311,7 @@ void SourceManager::noteSLocAddressSpaceUsage(
23112311

23122312
// Describe any remaining usage not reported in the per-file usage.
23132313
if (ReportedSize != CountedSize) {
2314-
Diag.Report(SourceLocation(), diag::note_file_misc_sloc_usage)
2314+
Diag.Report(diag::note_file_misc_sloc_usage)
23152315
<< (SortedUsage.end() - SortedEnd) << CountedSize - ReportedSize;
23162316
}
23172317
}

0 commit comments

Comments
 (0)