[PATCH] D119130: [clangd] NFC: Move stdlibg headers handling to Clang

2022-02-08 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 406794. kbobyrev added a comment. Add a comment for the helper function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119130/new/ https://reviews.llvm.org/D119130 Files: clang-tools-extra/clangd/CSymbolMap

[PATCH] D119130: [clangd] NFC: Move stdlibg headers handling to Clang

2022-02-08 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 406793. kbobyrev marked 5 inline comments as done. kbobyrev added a comment. Address the comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119130/new/ https://reviews.llvm.org/D119130 Files: clang-too

[PATCH] D119130: [clangd] NFC: Move stdlibg headers handling to Clang

2022-02-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/include/clang/Tooling/Inclusions/StandardLibrary.h:56 +// C++ and C Standard Library symbols are considered distinct: e.g. std::printf +// and ::printf are not treated as the same symbol. The callers have to act +// accordingly b

[PATCH] D119130: [clangd] NFC: Move stdlibg headers handling to Clang

2022-02-08 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D119130#3300780 , @kadircet wrote: > Regarding the include mapping generator, I think it would've been better if > we had some sort of list directly from libc++ (as this is now being part of > clang rather than just clangd),

[PATCH] D119130: [clangd] NFC: Move stdlibg headers handling to Clang

2022-02-08 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang/include/clang/Tooling/Inclusions/StandardLibrary.h:37 + static llvm::Optional named(llvm::StringRef Scope, + llvm::StringRef Name); + kadircet wrote: > should scope have trail

[PATCH] D119130: [clangd] NFC: Move stdlibg headers handling to Clang

2022-02-08 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 406741. kbobyrev marked 9 inline comments as done. kbobyrev added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119130/new/ https://reviews.llvm.org/D119130 Files: clang-

[PATCH] D119130: [clangd] NFC: Move stdlibg headers handling to Clang

2022-02-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Regarding the include mapping generator, I think it would've been better if we had some sort of list directly from libc++ (as this is now being part of clang rather than just clangd), but having the current symbol mapping available for other tools too is definitely a u

[PATCH] D119130: [clangd] NFC: Move stdlibg headers handling to Clang

2022-02-07 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 406401. kbobyrev added a comment. Move include-mapping generators to clang and re-generate the files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119130/new/ https://reviews.llvm.org/D119130 Files: clang-

[PATCH] D119130: [clangd] NFC: Move stdlibg headers handling to Clang

2022-02-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This looks sensible to me, but as I wrote this code we should maybe get a second look (@kadircet?) that it makes sense to lift to clang::tooling. Some positive experience: we've used it successfully in an internal clang-tidy check. Comment at: clan

[PATCH] D119130: [clangd] NFC: Move stdlibg headers handling to Clang

2022-02-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. The moved *.inc files are generated, the generator needs to be moved (and updated?) too I think. Is having clangd continue to include the .inc files textually intended to stay that way, or is it a FIXME? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI