kadircet added inline comments.

================
Comment at: clang-tools-extra/clangd/index/SymbolCollector.cpp:563
       if (auto Header = getIncludeHeader(QName, Entry.second)) {
+        // Hack: there are two std::move() overloads from different headers.
+        // CanonicalIncludes returns the common one-arg one from <utility>.
----------------
i think this should live inside `CanonicalIncludes`. What about changing 
`mapHeader` to take in an `llvm::Optional<size_t> NumParams` or 
`llvm::Optional<llvm::StringRef> Signature` ?

That way we can actually get rid of the ambiguity caused by all of the 
overloads. I am not sure if number of parameters is always going to be enough 
tho so `Signature` might be a safer bet with some canonicalization so that we 
can match the version in cppreference.

(I would prefer the solution above, but I am also fine with moving this into 
`SymbolCollector::getIncludeHeader` with a FIXME.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88885

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to