[PATCH] D93829: [clangd] Support outgoing calls in call hierarchy

2023-06-14 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. I'm interested but I don't have enough free time these days. So if anyone wants to take it from there, feel free to reuse my commits (or not). If I find myself with some free time and nobody else is working on this, I'll give it a shot Repository: rG LLVM Github Mon

[PATCH] D134384: [clangd] Add support for HeaderInsertion in .clangd config file

2022-10-01 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 464492. qchateau added a comment. - clangd: rename HeaderInsertion and IncludeInsertion, read value from Config Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134384/new/ https://reviews.llvm.org/D134384 Files

[PATCH] D134384: [clangd] Add support for HeaderInsertion in .clangd config file

2022-09-21 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. qchateau requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Add ability to configure header insertion

[PATCH] D112661: [clangd] reuse preambles from other files when possible

2022-06-08 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. @nridge after rebasing this change for several months, I find it less and less useful. It seems both clangd and the IDE I'm using are making significant improvements that make this changes less and less impactful. I closed this revision as I feel that it now passed the

[PATCH] D112661: [clangd] reuse preambles from other files when possible

2022-05-14 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 429478. qchateau added a comment. Small correction Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112661/new/ https://reviews.llvm.org/D112661 Files: clang-tools-extra/clangd/ClangdServer.cpp clang-tools-e

[PATCH] D112661: [clangd] reuse preambles from other files when possible

2022-05-14 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 429470. qchateau added a comment. Herald added a project: All. Resolve conflicts, fix formatting, simplify patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112661/new/ https://reviews.llvm.org/D112661 File

[PATCH] D112661: [clangd] reuse preambles from other files when possible

2021-10-27 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. This is a revisit of D97417 which is a bit out of date and fell into oblivion. I've been using a forked version of clangd including this change for months on my day-to-day work and it does significantly improve my experience. Some numbe

[PATCH] D112661: [clangd] reuse preambles from other files when possible

2021-10-27 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau created this revision. qchateau added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman, javed.absar. qchateau requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Keep a s

[PATCH] D97417: [clangd] use a compatible preamble for the first AST built

2021-09-23 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 374654. qchateau added a comment. - Rebase - Add cli argument to set the cache size - Reduce default cache size to 1 (to allow fast open/close/reopen) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97417/new/ h

[PATCH] D97417: [clangd] use a compatible preamble for the first AST built

2021-04-15 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. Herald added a project: clang-tools-extra. Have you guys been giving some thoughts to that patch ? I've been using it in my daily work since I submitted the patch, and I'd not go back Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D97983: [clangd] strictly respect formatting range

2021-03-04 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 328314. qchateau added a comment. fix tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97983/new/ https://reviews.llvm.org/D97983 Files: clang-tools-extra/clangd/ClangdServer.cpp clang-tools-extra/clan

[PATCH] D97983: [clangd] strictly respect formatting range

2021-03-04 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau created this revision. qchateau added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. qchateau requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. Clang format will often format a

[PATCH] D97417: [clangd] use a compatible preamble for the first AST built

2021-03-03 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 327923. qchateau added a comment. fix bad arc diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97417/new/ https://reviews.llvm.org/D97417 Files: clang-tools-extra/clangd/ParsedAST.cpp clang-tools-extra/

[PATCH] D97417: [clangd] use a compatible preamble for the first AST built

2021-03-03 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 327922. qchateau added a comment. rebase on main, fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97417/new/ https://reviews.llvm.org/D97417 Files: clang-tools-extra/clangd/TUScheduler.cpp In

[PATCH] D97417: [clangd] use a compatible preamble for the first AST built

2021-03-02 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. I am much more afraid of providing bad results than I am afraid of degrading performance. I mean, eventually the "real" preamble is built, and the results are just as correct as before, but it may yield incorrect results until we invalidate the AST. That is especially

[PATCH] D97417: [clangd] use a compatible preamble for the first AST built

2021-02-26 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 326816. qchateau added a comment. - [clangd] make more compile commands compatible - [clangd] ignore incompatible preamble I improved command line compatibility detection (faster & matches more files) and I had to blacklist some preambles. Namely, when th

[PATCH] D97417: [clangd] use a compatible preamble for the first AST built

2021-02-25 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. The hardcoded 5 premables can indeed be changed, I did not want to waste time on coding a configuration logic at such an early stage. Well indeed do some extra work if we elect a compatible but almost useless preamble. We'll basically do the work twice (but at least we

[PATCH] D97417: [clangd] use a compatible preamble for the first AST built

2021-02-24 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau created this revision. qchateau added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman, javed.absar. qchateau requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. Keep a store of the

[PATCH] D94875: [clangd] ignore parallelism level for quick tasks

2021-01-25 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. I applied your suggestion as I agree with both. I chose to use `Opts.AsyncThreadsCount` instead of a hard-coded constant. This way the "formatting speed" will grow as the user allow more parallelism, which IMO makes sense. I agree the implementation had drawbacks but

[PATCH] D94875: [clangd] ignore parallelism level for quick tasks

2021-01-25 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 319083. qchateau added a comment. - [clangd] fix nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94875/new/ https://reviews.llvm.org/D94875 Files: clang-tools-extra/clangd/ClangdServer.cpp clang-tools-

[PATCH] D94875: [clangd] ignore parallelism level for quick tasks

2021-01-17 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau created this revision. qchateau added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman, javed.absar. qchateau requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. This allows quick ta

[PATCH] D93829: [clangd] Support outgoing calls in call hierarchy

2021-01-17 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. You're right, I probably got carried away for the sake of completeness. Allocating extra memory for a feature nobody is going to use is definitely not worth it. Though maybe we can take advantage of what's already been done and if we remove the `RevRefs` map, and pay t

[PATCH] D93452: [clangd] Trim memory periodically

2021-01-14 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. If you look back at my original comment, you'll notice I originally trimmed the memory after `FileSymbols::buildIndex` which seemed to be the "end of the peak" memory usage, the goal was to counteract exactly what you describe: a huge memory usage when clangd warms-up

[PATCH] D93873: [clangd] Cache preambles of closed files

2021-01-11 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. Hey, don't worry about the delay, I won't have as much time on my hands anymore anyway. - we can definitely make this opt-in - MB instead of # is an idea, it's probably closer to what the user want to configure - if he does - but it would also probably give a worse def

[PATCH] D93829: [clangd] Support outgoing calls in call hierarchy

2021-01-11 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:1843 +auto Kind = Callee.SymInfo.Kind; +if (Kind != SK::Function && Kind != SK::InstanceMethod && +Kind != SK::ClassMethod && Kind != SK::StaticMethod && nridge wrote:

[PATCH] D93873: [clangd] Cache preambles of closed files

2021-01-09 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. New year's ping ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93873/new/ https://reviews.llvm.org/D93873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D94265: [clangd] Search compiler in PATH for system include extraction If the compiler is specified by its name, search it in the system PATH instead of the command directory: this is what th

2021-01-07 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau abandoned this revision. qchateau added a comment. Ah ! It's been done already ! https://reviews.llvm.org/D93600 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94265/new/ https://reviews.llvm.org/D94265

[PATCH] D94265: [clangd] Search compiler in PATH for system include extraction If the compiler is specified by its name, search it in the system PATH instead of the command directory: this is what th

2021-01-07 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau created this revision. qchateau added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. qchateau requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Mono

[PATCH] D93873: [clangd] Cache preambles of closed files

2020-12-30 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 314152. qchateau added a comment. - Fix keep preamble command line option - Fix tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93873/new/ https://reviews.llvm.org/D93873 Files: clang-tools-extra/clangd

[PATCH] D93873: [clangd] Cache preambles of closed files

2020-12-28 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau created this revision. qchateau added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman, javed.absar. qchateau requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. When a file is close

[PATCH] D93829: [clangd] Support outgoing calls in call hierarchy

2020-12-27 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. Note: Build fails due to clang-tidy warnings in tests. I chose to keep the naming consistent with what's already in place rather than fix the clang-tidy warning. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93829/new/ h

[PATCH] D93829: [clangd] Support outgoing calls in call hierarchy

2020-12-27 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 313776. qchateau added a comment. - Smaller reversed refs memory usage - Fix Dex::estimateMemoryUsage Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93829/new/ https://reviews.llvm.org/D93829 Files: clang-to

[PATCH] D93829: [clangd] Support outgoing calls in call hierarchy

2020-12-26 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 313767. qchateau added a comment. - Fix tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93829/new/ https://reviews.llvm.org/D93829 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp clang-tools-extra

[PATCH] D93829: [clangd] Support outgoing calls in call hierarchy

2020-12-26 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau created this revision. qchateau added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman, mgrang. qchateau requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. The implementation is ver

[PATCH] D93726: [clangd] Use atomics instead of locks to track periodic memory trimming

2020-12-22 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau accepted this revision. qchateau added a comment. This revision is now accepted and ready to land. LGTM Small nits: - `operator()` is not `const` but `Next` is `mutable`, seems to me you intended to have `operator()` as `const` - memory orders for the atomic operations can probably be

[PATCH] D93452: [clangd] Trim memory periodically

2020-12-21 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 313215. qchateau marked 3 inline comments as done. qchateau added a comment. The log is back, I renamed the CMake option and the command line option and reduced the number of preprocessor directives. I chose not to modify the files for the `gn` build system,

[PATCH] D93546: [clangd][NFC] Improve clangd status messages

2020-12-21 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. Sure ! Email: quentin.chat...@gmail.com I guess I'll need to ask for commit access Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93546/new/ https://reviews.llvm.org/D93546 ___

[PATCH] D93546: [clangd][NFC] Improve clangd status messages

2020-12-21 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 313079. qchateau added a comment. - dont capitalize first letter of status Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93546/new/ https://reviews.llvm.org/D93546 Files: clang-tools-extra/clangd/ClangdServ

[PATCH] D93452: [clangd] Trim memory periodically

2020-12-20 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. Here is the latest version, I believe it should mostly look like what you expect. Let me know if there is anything that you'd like me to change, it's totally fine to have a few more iterations on this diff. I added a `CLANGD_ENABLE_MEMORY_CLEANUP` to make sure people c

[PATCH] D93452: [clangd] Trim memory periodically

2020-12-20 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 313000. qchateau marked 16 inline comments as done. qchateau added a comment. - Move platform specific code to ClangdMain - Generic memory cleanup callback in ClangdLSPServer Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D93452: [clangd] Trim memory periodically

2020-12-20 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. > Sorry to mess you around like this, but I think I might have jumped the gun > in asking this to be abstracted away in `Process.h`. No problem, there is not much code anyway. The thought process behind the "right" solution is by far the most important. > So I think m

[PATCH] D93452: [clangd] Trim memory periodically

2020-12-20 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. > Interestingly clangd held rock solid at 1.0GB recorded memory usage > throughout. What do you mean exactly ? Using the built in memory usage measurement ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93452/new/ https:

[PATCH] D93452: [clangd] Trim memory periodically

2020-12-19 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau planned changes to this revision. qchateau marked 2 inline comments as done. qchateau added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.h:52 +// Malloc trim minimal period +std::chrono::seconds MemoryCleanupPeriod = std::chrono::seconds(

[PATCH] D93452: [clangd] Trim memory periodically

2020-12-18 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 312853. qchateau added a comment. - Fix clang-tidy errors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93452/new/ https://reviews.llvm.org/D93452 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp clang

[PATCH] D93553: [clangd] Make our printing policies for Hover more consistent, especially tags

2020-12-18 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. Looks good to me, it removes a lot of duplication and corner cases. I'd have printed the tag for reference and pointers as well (`class Foo*` instead of `Foo*`). I don't think `Foo*` is much more understandable than `Foo`, so we decide that printing `class Foo` is easi

[PATCH] D93546: [clangd][NFC] Improve clangd status messages

2020-12-18 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau created this revision. qchateau added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman, javed.absar. qchateau requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. clangd actions have

[PATCH] D93227: [clangd] Smarter hover on auto and decltype

2020-12-18 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added inline comments. Comment at: clang-tools-extra/clangd/AST.cpp:353 if (auto *AT = D->getType()->getContainedAutoType()) { - if (!AT->getDeducedType().isNull()) -DeducedType = AT->getDeducedType(); + DeducedType = AT->desugar(); }

[PATCH] D93452: [clangd] Trim memory after buildINdex

2020-12-18 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 312781. qchateau added a comment. Herald added subscribers: llvm-commits, dexonsmith, hiraditya. Herald added a project: LLVM. - Add MallocTrim to llvm::sys::Process - Implement malloc trimming in ClangdLSPServer Repository: rG LLVM Github Monorepo CHANG

[PATCH] D93227: [clangd] Smarter hover on auto and decltype

2020-12-18 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 312757. qchateau added a comment. Fix ExpandAutoType to not expand undeduced auto Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93227/new/ https://reviews.llvm.org/D93227 Files: clang-tools-extra/clangd/AST

[PATCH] D93227: [clangd] Smarter hover on auto and decltype

2020-12-18 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. You can land this if it is still fine after my final update. email: quentin.chat...@gmail.com Thanks ! Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:2452 // In namespace ns ret_type foo(params) {})", }, I've

[PATCH] D93227: [clangd] Smarter hover on auto and decltype

2020-12-18 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 312747. qchateau marked 5 inline comments as done. qchateau added a comment. - Verify documentation in hover test on 'auto' - Fixed comments - Converted raw string to string to avoid trailing whitespace Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D93227: [clangd] Smarter hover on auto and decltype

2020-12-17 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:618 + } else { +CXXRecordDecl *D = QT->getAsCXXRecordDecl(); +if (D && D->isLambda()) sammccall wrote: > You've rewritten this logic compared to the old `getHoverContents(Qual

[PATCH] D93227: [clangd] Smarter hover on auto and decltype

2020-12-17 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 312545. qchateau marked 3 inline comments as done. qchateau added a comment. I updated this diff according to your review. There are a few things that may still need change but I need your input, see my other comments :) Repository: rG LLVM Github Monore

[PATCH] D93452: [clangd] Trim memory after buildINdex

2020-12-17 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau planned changes to this revision. qchateau added a comment. > Periodic malloc_trim seems like it solves a real problem, one I don't > personally fully understand but we may never do - I feel convinced we should > use it anyway. It probably has some overhead, who knows how much. It does

[PATCH] D93452: [clangd] Trim memory after buildINdex

2020-12-17 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 312500. qchateau added a comment. Herald added a subscriber: mgorny. Add macro to use malloc_trim only if available Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93452/new/ https://reviews.llvm.org/D93452 Fil

[PATCH] D93452: [clangd] Trim memory after buildINdex

2020-12-17 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. > Side note is this memory failing to free behaviour observed on windows? No idea, I only develop on linux. Looking at the the github issues, it seems people that had the issue were also using the linux version...so we can't conclude anything about windows =

[PATCH] D93452: [clangd] Trim memory after buildINdex

2020-12-17 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau created this revision. qchateau added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. qchateau requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. This diff addresses the issue of

[PATCH] D93227: [clangd] Smarter hover on auto and decltype

2020-12-17 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. > We can't easily add new SymbolKinds (it's an enum we don't own, which we > should fix, but that's a yak-shave). But `TypeAlias` almost fits these roles > for auto. Yes I originally wanted to have "deduced-type `auto`" but I realized it would not be easy. I did not t

[PATCH] D93227: [clangd] Smarter hover on auto and decltype

2020-12-17 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 312432. qchateau added a comment. - Rebase on master after D92041 - Remove the usage of the "Documentation" field - Use the `TypeAlias` Kind on auto and decltype - Move code related to hover on `this` in a new function - Upda

[PATCH] D93314: [clangd] go-to-definition on auto unwraps array/pointer types

2020-12-16 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. > So I'm leaning towards defining these behaviors for **pointers and > containers** rather than **templates** per se. There's a nice symmetry with > the raw pointer and array types that this patch. > (We have some precedent and code for detecting smart pointers, see >

[PATCH] D93314: [clangd] go-to-definition on auto unwraps array/pointer types

2020-12-15 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. Ah good catch, I agree this is the behavior we want. Concerning cases like `unique_ptr`, the only generic behavior I can think of would be to suggest multiple `LocatedSymbol` when `auto` is deduced to a template class: the template class itself, and all its template ty

[PATCH] D93227: [clangd] Smarter hover on auto and decltype

2020-12-14 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. qchateau requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. Only show the keyword as the hover "Name". Show whether the type is de

[PATCH] D92977: [clangd] Improve hover and goToDefinition on auto and dectype

2020-12-11 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. I've updated the patch with your latest comments. Please commit this patch for me, using "quentin.chat...@gmail.com", I'll probably ask for commit access after a few successful reviews Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D92977: [clangd] Improve hover and goToDefinition on auto and dectype

2020-12-11 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 311247. qchateau marked an inline comment as done. qchateau added a comment. - Reintroduce test with a FIXME comment - locateSymbolForType returns a vector instead of an optional Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D92977: [clangd] Improve hover and goToDefinition on auto and dectype

2020-12-11 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau marked 3 inline comments as done. qchateau added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:689 +const NamedDecl *D = Deduced->getTypePtr()->getAsTagDecl(); +if (!D) + continue; sammccall wrote: > there are m

[PATCH] D92977: [clangd] Improve hover and goToDefinition on auto and dectype

2020-12-11 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 311219. qchateau added a comment. - Remove the patches affecting hover - Add tests in ASTTests.cpp to test the behavior of getDeducedType for auto and decltype - Add missing comment - Create a locateSymbolForType function (which uses targetDecl) - Remove the

[PATCH] D92977: [clangd] Improve hover and goToDefinition on auto and dectype

2020-12-10 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. Not sure what's wrong with the unit test "x64 windows > LLVM.CodeGen/XCore::threads.ll", I don't see how it's related to my patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92977/new/ https://reviews.llvm.org/D92977 _

[PATCH] D92977: [clangd] Improve hover and goToDefinition on auto and dectype

2020-12-10 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 310872. qchateau added a comment. Fix unittests and behavior I've fixed the failing unittests, added some more to test the new behavior, and fixed some bugs in the new code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D92977: [clangd] Improve hover and goToDefinition on auto and dectype

2020-12-09 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. qchateau requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. Make the hover content on auto and decltype look like the hover content