Skip to content

Commit

Permalink
[Basic] Fix a warning
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
kazutakahirata committed Oct 6, 2023
1 parent 71d83bb commit 5009d24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clang/lib/Basic/SourceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 different AST files.
Expand Down

1 comment on commit 5009d24

@jansvoboda11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Please sign in to comment.