kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land.
================ Comment at: clang-tools-extra/clangd/index/SymbolCollector.cpp:901 } + if (auto StdSym = tooling::stdlib::Symbol::named(S->Scope, S->Name, Lang)) + if (auto Header = StdSym->header()) ---------------- we shouldn't be overriding the include header if it's already set above. also i think it would be easier to have this out of the way so that reverting to old behaviour is easier: ``` llvm::StringRef getStdHeader(const Symbol *S, const LanguageOptions &LO) { tooling::stdlib::Lang Lang = tooling::stdlib::Lang::CXX; if (ASTCtx->getLangOpts().C11) Lang = tooling::stdlib::Lang::C; else if(!ASTCtx->getLangOpts().CPlusPlus) return ""; if (S->Scope == "std::" && S->Name == "move") { if (!S->Signature.contains(',')) return "<utility>"; return "<algorithm>"; } if (auto StdSym = tooling::stdlib::Symbol::named(S->Scope, S->Name, Lang)) if (auto Header = StdSym->header()) return Header->name(); return ""; } ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156403/new/ https://reviews.llvm.org/D156403 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits