[PATCH] D124688: [clangd] parse all make_unique-like functions in preamble
Tobias Ribizel via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 2 05:58:00 PDT 2022
upsj updated this revision to Diff 426387.
upsj marked 2 inline comments as done.
upsj added a comment.
Herald added a subscriber: javed.absar.
Rewrote detection of forwarding functions in preamble, added `--preamble-parse-forwarding` flag
I ran clangd over `bits/stdc++.h`, and it seems like the condition works very well:
It picked up
- container::emplace and friends
- allocator::construct and friends
- make_unique, make_shared and friends
- some parts of `functional`
- some parts of `tuple`
- some parts of `thread`
most of which seem like good candidates for forwarding parameters.
In terms of runtime, I can't see any noticeable difference between parsing with or without `--preamble-parse-forwarding`, but of course, all of libstdc++ is not the most realistic scenario
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124688/new/
https://reviews.llvm.org/D124688
Files:
clang-tools-extra/clangd/ClangdServer.cpp
clang-tools-extra/clangd/ClangdServer.h
clang-tools-extra/clangd/Preamble.cpp
clang-tools-extra/clangd/Preamble.h
clang-tools-extra/clangd/TUScheduler.cpp
clang-tools-extra/clangd/TUScheduler.h
clang-tools-extra/clangd/tool/Check.cpp
clang-tools-extra/clangd/tool/ClangdMain.cpp
clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
clang-tools-extra/clangd/unittests/FileIndexTests.cpp
clang-tools-extra/clangd/unittests/ParsedASTTests.cpp
clang-tools-extra/clangd/unittests/PreambleTests.cpp
clang-tools-extra/clangd/unittests/TestTU.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124688.426387.patch
Type: text/x-patch
Size: 17840 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220502/27f74b14/attachment-0001.bin>
More information about the cfe-commits
mailing list