[PATCH] D65754: Fix toHalfOpenFileRange assertion fail

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 6 07:55:02 PDT 2019


sammccall added inline comments.


================
Comment at: clang-tools-extra/clangd/SourceCode.cpp:316
+  // Expand begin of Expansion range till the top and map with file id hash.
+  llvm::DenseMap<unsigned, SourceRange> BeginExpansions;
+  SourceRange BeginExpansion = ExpansionRange.getBegin();
----------------
sammccall wrote:
> DenseMap<FileID, SourceRange>
> 
> Why are the values SourceRange here and not just SourceLocation?
meant to say here: I think FileID is a legitimate key in a DenseMap, no need for unsigned

(the DenseMapInfo<clang::FileID> specialization exists, which should make it work)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65754/new/

https://reviews.llvm.org/D65754





More information about the cfe-commits mailing list