aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorBoaz Brickner <brickner@google.com>2024-11-21 09:41:09 +0100
committerGitHub <noreply@github.com>2024-11-21 09:41:09 +0100
commitbc7f24cd8d6180ba297ea33ef5b4631a1bd26aea (patch)
treedef6c0970d8be5c04043bfbe3507549135c263a1 /clang/lib/Basic/SourceManager.cpp
parentade0750e3529ee251cbfb60ce66904a8553381e4 (diff)
downloadllvm-bc7f24cd8d6180ba297ea33ef5b4631a1bd26aea.zip
llvm-bc7f24cd8d6180ba297ea33ef5b4631a1bd26aea.tar.gz
llvm-bc7f24cd8d6180ba297ea33ef5b4631a1bd26aea.tar.bz2
[clang] [NFC] Remove SourceLocation() parameter from Diag.Report() calls in SourceManager, and use the equivalent Report() overload instead (#116937)
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r--clang/lib/Basic/SourceManager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp
index 9b983ce..6e588ce 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -665,7 +665,7 @@ SourceManager::createExpansionLocImpl(const ExpansionInfo &Info,
LocalSLocEntryTable.push_back(SLocEntry::get(NextLocalOffset, Info));
if (NextLocalOffset + Length + 1 <= NextLocalOffset ||
NextLocalOffset + Length + 1 > CurrentLoadedOffset) {
- Diag.Report(SourceLocation(), diag::err_sloc_space_too_large);
+ Diag.Report(diag::err_sloc_space_too_large);
// FIXME: call `noteSLocAddressSpaceUsage` to report details to users and
// use a source location from `Info` to point at an error.
// Currently, both cause Clang to run indefinitely, this needs to be fixed.
@@ -2295,7 +2295,7 @@ void SourceManager::noteSLocAddressSpaceUsage(
uint64_t LoadedUsage = MaxLoadedOffset - CurrentLoadedOffset;
int UsagePercent = static_cast<int>(100.0 * double(LocalUsage + LoadedUsage) /
MaxLoadedOffset);
- Diag.Report(SourceLocation(), diag::note_total_sloc_usage)
+ Diag.Report(diag::note_total_sloc_usage)
<< LocalUsage << LoadedUsage << (LocalUsage + LoadedUsage)
<< UsagePercent;
@@ -2311,7 +2311,7 @@ void SourceManager::noteSLocAddressSpaceUsage(
// Describe any remaining usage not reported in the per-file usage.
if (ReportedSize != CountedSize) {
- Diag.Report(SourceLocation(), diag::note_file_misc_sloc_usage)
+ Diag.Report(diag::note_file_misc_sloc_usage)
<< (SortedUsage.end() - SortedEnd) << CountedSize - ReportedSize;
}
}