[clang] 5009d24 - [Basic] Fix a warning
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 6 13:07:59 PDT 2023
Author: Kazu Hirata
Date: 2023-10-06T13:07:53-07:00
New Revision: 5009d249a5ef6548182256ce3e8ece55e8c68987
URL: https://github.com/llvm/llvm-project/commit/5009d249a5ef6548182256ce3e8ece55e8c68987
DIFF: https://github.com/llvm/llvm-project/commit/5009d249a5ef6548182256ce3e8ece55e8c68987.diff
LOG: [Basic] Fix a warning
This patch fixes:
clang/lib/Basic/SourceManager.cpp:1979:64: error: 'greater' may not
intend to support class template argument deduction
[-Werror,-Wctad-maybe-unsupported]
Added:
Modified:
clang/lib/Basic/SourceManager.cpp
Removed:
################################################################################
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp
index a3bd74df2798154..b8e7650accdbfa0 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -1976,7 +1976,8 @@ bool SourceManager::isInTheSameTranslationUnitImpl(
auto FindSLocEntryAlloc = [this](FileID FID) {
// Loaded FileIDs are negative, we store the lowest FileID from each
// allocation, later allocations have lower FileIDs.
- return llvm::lower_bound(LoadedSLocEntryAllocBegin, FID, std::greater{});
+ return llvm::lower_bound(LoadedSLocEntryAllocBegin, FID,
+ std::greater<FileID>{});
};
// If both are loaded from
diff erent AST files.
More information about the cfe-commits
mailing list