[PATCH] D76098: [clangd] Do not trigger go-to-def textual fallback inside string literals

2020-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb89202e842ac: [clangd] Do not trigger go-to-def textual fallback inside string literals (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7

[PATCH] D73916: [clang] Add `forceReload` clangd extension to 'textDocument/didChange'

2020-02-18 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Which client(s) use or plan to use this extension? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73916/new/ https://reviews.llvm.org/D73916 ___ cfe-commits mailing list cfe-comm

[PATCH] D73649: [CodeComplete] Member completion for concept-constrained types.

2020-02-18 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Thanks for looking at this! Sorry for the late response, I was travelling for a few weeks. So far I've only had a chance to look at the tests. Comment at: clang/test/CodeCompletion/concepts.cpp:34 + // RUN: | FileCheck %s -check-prefix=DOT -implicit-c

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-01-16 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This facilitates performing go-to-definition inside comments, strings, invalid code, and dependen

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-01-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:203 + if (!Symbols) { +elog("Workspace symbols failed", Symbols.takeError()); + } (There should be a return here, will fix locally.) Repo

[PATCH] D73124: [clangd] Add C++20 concepts support to FindTarget and semantic highlighting

2020-01-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Fixes https://github.com/clangd/clangd/issues/259 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D73124 Files:

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-01-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge planned changes to this revision. nridge added a comment. Thanks for taking a look! In D72874#1831977 , @sammccall wrote: > - it triggers on almost every word, even words that plainly don't refer to > any decl like `format [[lazily]], in case vlog

[PATCH] D73140: [clangd] Add C++20 concepts support to TargetFinder

2020-01-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D73140 Files: clang-tools-extra/clangd/FindTarget.cpp clang-tool

[PATCH] D73124: [clangd] Add C++20 concepts support to findExplicitReferences() and semantic highlighting

2020-01-23 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc6c5dbc824c5: [clangd] Add C++20 concepts support to findExplicitReferences() and semantic… (authored by nridge). Changed prior to commit: https://reviews.llvm.org/D73124?vs=239370&id=239974#toc Reposi

[PATCH] D73140: [clangd] Add C++20 concepts support to TargetFinder

2020-01-23 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcbcd07a4815f: [clangd] Add C++20 concepts support to TargetFinder (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73140/new/ https://rev

[PATCH] D65625: [clangd] Allow the client to specify multiple compilation databases in the 'initialize' request

2020-01-23 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 24. nridge added a comment. Herald added a subscriber: usaxena95. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65625/new/ https://reviews.llvm.org/D65625 Files: clang-tools-extra/clangd/ClangdLSPS

[PATCH] D65625: [clangd] Allow the client to specify multiple compilation databases in the 'initialize' request

2020-01-23 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Ilya / others if interested, I would like to revive this patch. We left off with a discussion in the corresponding issue , where I made a suggestion for an

[PATCH] D67537: [clangd] Client-side support for inactive regions

2020-01-23 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D67537#1833987 , @hokein wrote: > there is some significant progress about semantic highlighting on VSCode, > VSCode now provides an experimental semantic token API >

[PATCH] D67537: [clangd] Client-side support for inactive regions

2020-01-23 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 240026. nridge marked an inline comment as done. nridge added a comment. Inject the inactive code decoration type into Highligher.decorationTypes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67537/new/ https://

[PATCH] D145319: [clangd] Refine logic on $0 in completion snippets

2023-03-15 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Thanks for the update! I have a couple of more minor suggestions, hope you don't mind; I'm trying to make sure the next person to look at this will easily understand what the code is trying to do. Comment at: clang-tools-extra/clangd/CodeCompletionStri

[PATCH] D145319: [clangd] Refine logic on $0 in completion snippets

2023-03-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge accepted this revision. nridge added a comment. This revision is now accepted and ready to land. Thanks! I have just one final nit, then please feel free to merge. Comment at: clang-tools-extra/clangd/CodeCompletionStrings.cpp:60 +bool shouldPatchPlaceholder0(CodeCompl

[PATCH] D145843: [clangd] Add option to always insert headers with <> instead of ""

2023-03-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Thanks for the patch! May I suggest the flag name `IncludeDelimiter`, with values `Auto` and `AlwaysBrackets` (with the default being `Auto`)? This leaves room for other styles in the future if desired. It would mean a slight implementation change since the YAML represe

[PATCH] D146377: [clangd] Remove reundant use of getSpellingLoc()

2023-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added reviewers: hokein, kadircet. Herald added a subscriber: arphaman. Herald added a project: All. nridge requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. getFileLoc()

[PATCH] D146377: [clangd] Remove reundant use of getSpellingLoc()

2023-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. No functional changes intended, this redundancy is just something I noticed while I was learning about these functions during my review of D144074 and looking at other usages of them in clnagd. Repository: rG LLVM Github Monorepo C

[PATCH] D134827: [clangd] Avoid recursion on UnresolvedUsingValueDecl during semantic highlighting

2023-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 506359. nridge added a comment. add test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134827/new/ https://reviews.llvm.org/D134827 Files: clang-tools-extra/clangd/SemanticHighlighting.cpp clang-tools-

[PATCH] D134827: [clangd] Avoid recursion on UnresolvedUsingValueDecl during semantic highlighting

2023-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:143 auto Targets = Resolver->resolveUsingValueDecl(UUVD); -if (!Targets.empty()) { +if (!Targets.empty() && Targets[0] != UUVD) { return kindForDecl(Targets[0], Resolve

[PATCH] D134827: [clangd] Avoid recursion on UnresolvedUsingValueDecl during semantic highlighting

2023-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. I will go ahead and merge this partial fix because it is an improvement over the current state. @sammccall I'm still curious to know your thoughts on the approach for fixing the mutually-recursive case. Is there something more general than adding a recursion guard like

[PATCH] D134827: [clangd] Avoid recursion on UnresolvedUsingValueDecl during semantic highlighting

2023-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7138e75d1bb5: [clangd] Avoid recursion on UnresolvedUsingValueDecl

[PATCH] D134827: [clangd] Avoid recursion on UnresolvedUsingValueDecl during semantic highlighting

2023-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. My apologies. I did run tests locally but on a slightly older tree. I'll post a fix momentarily. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134827/new/ https://reviews.llvm.org/D134827 __

[PATCH] D134827: [clangd] Avoid recursion on UnresolvedUsingValueDecl during semantic highlighting

2023-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Should be fixed in https://reviews.llvm.org/rG9d042ed1a4f4. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134827/new/ https://reviews.llvm.org/D134827 ___ cfe-commits mailing list

[PATCH] D143974: [clangd] Inactive regions support via dedicated protocol

2023-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. The issue addressed by this patch is attracting a steady stream of user interest (two recent examples are https://github.com/clangd/clangd/issues/1545 and https://github.com/clangd/vscode-clangd/issues/469). A review would be appreciated :) Repository: rG LLVM Github

[PATCH] D145843: [clangd] Add option to always insert headers with <> instead of ""

2023-03-20 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. My understanding is that a more elaborate configuration scheme has been proposed in https://github.com/clangd/clangd/issues/1367, and the feedback there was (quoting Sam from this comment ): > I think

[PATCH] D146377: [clangd] Remove reundant use of getSpellingLoc()

2023-03-20 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG57bfe25574a0: [clangd] Remove reundant use of getSpellingLoc() (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146377/new/ https://revie

[PATCH] D145843: [clangd] Add option to always insert headers with <> instead of ""

2023-03-25 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Thanks for the clarification and suggested formulation. In D145843#4209750 , @sammccall wrote: > I'd suggest something like: > > Style: > QuotedHeaders: "path/to/.*" > AngledHeaders: "path/sdk/.*" > > where the regexes c

[PATCH] D146874: [clangd] Fix a hover crash on unsigned 64bit value

2023-03-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:396 // -2=> 0xfffe -// -2^32 => 0xfffe +// -2^32 => 0x static llvm::FormattedNumber printHex(const llvm::APSInt &V) { Just to make sure I'm not miss

[PATCH] D146874: [clangd] Fix a hover crash on unsigned 64bit value

2023-03-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge accepted this revision. nridge added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146874/new/ https://reviews.llvm.org/D146874

[PATCH] D144074: [clangd] Hide inlay hints when using a macro as a calling argument that with a param comment

2023-02-25 Thread Nathan Ridge via Phabricator via cfe-commits
nridge accepted this revision. nridge added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144074/new/ https://reviews.llvm.org/D144074

[PATCH] D145319: [clangd] Refine logic on $0 in completion snippets

2023-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Thanks for the patch! In the future we may want to add other cursor kinds for which `ShouldPatchPlaceholder0` should be false, but I think this is a good start which addresses the case from the bug. Comment at: clang-tools-extra/clangd/CodeComplete.cp

[PATCH] D127184: [clangd] Add to header map

2023-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. What is the status of this patch -- is it still relevant, and if so are there plans to finish/merge it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127184/new/ https://reviews.llvm.org/D127184 __

[PATCH] D139277: [clangd] Use all query-driver arguments in cache key

2023-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. @ehntoo hi! are you planning to update this patch to address Kadir's comments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139277/new/ https://reviews.llvm.org/D139277 ___ cfe-c

[PATCH] D142692: [clang] Store the template param list of an explicit variable template specialization

2023-03-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Review ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142692/new/ https://reviews.llvm.org/D142692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D144453: [clangd] Fix a bug in TweakTest::decorate()

2023-03-14 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe9a88b6178d3: [clangd] Fix a bug in TweakTest::decorate() (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144453/new/ https://reviews.ll

[PATCH] D142692: [clang] Store the template param list of an explicit variable template specialization

2023-03-14 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6b50bfc8f25a: [clang] Store the template param list of an explicit variable template… (authored by nridge). Repository: rG LLVM Github Monorepo C

[PATCH] D153248: [clangd] Use resolveTypeToRecordDecl() to resolve the type of a base specifier during heuristic resolution

2023-06-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: hokein. Herald added subscribers: kadircet, arphaman. Herald added a project: All. nridge requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. The code for

[PATCH] D153248: [clangd] Use resolveTypeToRecordDecl() to resolve the type of a base specifier during heuristic resolution

2023-06-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. As this patch involves copying a bit of code from CXXRecordDecl::lookupDepenentName() to HeuristicResolver, I wanted to mention a couple of alternatives I considered: 1. Copy things in the other direction, i.e. implement some of the necessary parts of resolveTypeToRecor

[PATCH] D153251: [clangd] Index the type of a non-type template parameter

2023-06-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: hokein. Herald added subscribers: kadircet, arphaman. Herald added a project: All. nridge requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added projects: clang, clang-tools-extra. Fixes

[PATCH] D153251: [clangd] Index the type of a non-type template parameter

2023-06-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge planned changes to this revision. nridge added inline comments. Comment at: clang/lib/Index/IndexDecl.cpp:708 } else if (const auto *NTTP = dyn_cast(TP)) { +IndexCtx.indexTypeSourceInfo(NTTP->getTypeSourceInfo(), Parent); if (NTTP->hasDefaultArgumen

[PATCH] D153248: [clangd] Use resolveTypeToRecordDecl() to resolve the type of a base specifier during heuristic resolution

2023-06-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D153248#4432108 , @hokein wrote: > The other question might worth thinking, are these cases critical to fix now? > I'm not sure `this->find()` is a common case (`find();` already works today). I may have simplified the test ca

[PATCH] D153251: [clangd] Index the type of a non-type template parameter

2023-06-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 532798. nridge added a comment. Address review comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153251/new/ https://reviews.llvm.org/D153251 Files: clang/lib/Index/IndexDecl.cpp clang/unittests/Index/I

[PATCH] D153251: [clangd] Index the type of a non-type template parameter

2023-06-20 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc3075023850b: [clangd] Index the type of a non-type template parameter (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153251/new/ https

[PATCH] D153248: [clangd] Use resolveTypeToRecordDecl() to resolve the type of a base specifier during heuristic resolution

2023-06-20 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6fe9cfe4137b: [clangd] Use resolveTypeToRecordDecl() to resolve the type of a base specifier… (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D153946: [clangd] Add a flag to allow indexing of reserved identifiers

2023-06-28 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added reviewers: hokein, kadircet. Herald added a subscriber: arphaman. Herald added a project: All. nridge requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Some project

[PATCH] D153946: [clangd] Add a flag to allow indexing of reserved identifiers

2023-06-28 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. No tests yet, posting for early feedback. Comment at: clang-tools-extra/clangd/index/StdLib.cpp:233 IndexOpts.StoreAllDocumentation = true; + // FIXME: Should we respect the Index.ReservedIdentifiers config here? // Sadly we can't use IndexOpts.Fi

[PATCH] D146941: [clangd] Use all inputs to SystemIncludeExtractor in cache key

2023-04-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/SystemIncludeExtractor.cpp:80 + std::string Driver; + std::string Directory; + // Whether certain includes should be part of query. It looks like the purpose of including `Directory` in the key

[PATCH] D143974: [clangd] Inactive regions support via dedicated protocol

2023-04-08 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 511957. nridge marked 3 inline comments as done. nridge added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143974/new/ https://reviews.llvm.org/D143974 Files: clang-tools-e

[PATCH] D143974: [clangd] Inactive regions support via dedicated protocol

2023-04-08 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:977 + return CB(InpAST.takeError()); +// Include inactive regions in semantic highlighting tokens only if the +// client doesn't support a ded

[PATCH] D147905: [clangd] Avoid passing -xobjective-c++-header to the system include extractor

2023-04-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. nridge requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Fixes https://githu

[PATCH] D147905: [clangd] Avoid passing -xobjective-c++-header to the system include extractor

2023-04-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Note: I did not rebase this on top of D146941 , because I'd like to suggest that this fix be backported to the 16.x branch (and presumably that's not the case for D146941 ); however, I'm happy to rebase

[PATCH] D146941: [clangd] Use all inputs to SystemIncludeExtractor in cache key

2023-04-13 Thread Nathan Ridge via Phabricator via cfe-commits
nridge accepted this revision. nridge added a comment. This revision is now accepted and ready to land. Thanks! Do you have any thoughts on merging D147905 first, with a view to backporting D147905 to the 16.x branch?

[PATCH] D147905: [clangd] Avoid passing -xobjective-c++-header to the system include extractor

2023-04-13 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/SystemIncludeExtractor.cpp:340 +// is not installed. +if (Lang == "objective-c++-header") { + Lang = "c++-header"; kadircet wrote: > this feels like too much of a layering violation a

[PATCH] D143974: [clangd] Inactive regions support via dedicated protocol

2023-04-13 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 513450. nridge marked 2 inline comments as done. nridge added a comment. address nit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143974/new/ https://reviews.llvm.org/D143974 Files: clang-tools-extra/clangd/

[PATCH] D143974: [clangd] Inactive regions support via dedicated protocol

2023-04-13 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:977 + return CB(InpAST.takeError()); +// Include inactive regions in semantic highlighting tokens only if the +// client doesn't support a dedicated protocol for being informed about

[PATCH] D143974: [clangd] Inactive regions support via dedicated protocol

2023-04-14 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3f6a904b2f3d: [clangd] Inactive regions support via dedicated protocol (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D143974: [clangd] Inactive regions support via dedicated protocol

2023-04-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. The patch is causing `initialize-params.test` to fail, fix coming right up. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143974/new/ https://reviews.llvm.org/D143974 ___ cfe-comm

[PATCH] D143974: [clangd] Inactive regions support via dedicated protocol

2023-04-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D143974#4267320 , @nridge wrote: > The patch is causing `initialize-params.test` to fail, fix coming right up. Fixed in https://github.com/llvm/llvm-project/commit/28575f41cd7df98012fb15f18434411a941ec228. Repository: rG L

[PATCH] D147905: [clangd] Avoid passing -xobjective-c++-header to the system include extractor

2023-04-15 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a subscriber: dgoldman. nridge added inline comments. Comment at: clang-tools-extra/clangd/SystemIncludeExtractor.cpp:340 +// is not installed. +if (Lang == "objective-c++-header") { + Lang = "c++-header"; kadircet wrote: > nridge wrote:

[PATCH] D143260: [clangd] Add semantic token for labels

2023-04-15 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D143260#4267883 , @kadircet wrote: > I am not sure if access specifiers and label declarations occur in the same > context often enough for this mixing to actually cause trouble TBH. I think the focus on access specifiers is a

[PATCH] D146941: [clangd] Use all inputs to SystemIncludeExtractor in cache key

2023-04-15 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D146941#4264146 , @nridge wrote: > Do you have any thoughts on merging D147905 > first, with a view to backporting D147905 > to the 16.x branch? Since ther

[PATCH] D147846: [clangd] Hover: resolve forwarding parameters for CalleeArgInfo

2023-04-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge accepted this revision. nridge added a comment. This revision is now accepted and ready to land. Makes sense, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147846/new/ https://reviews.llvm.org/D147846 ___

[PATCH] D147847: [clangd] Hover: Add CalleeArgInfo for constructor expressions

2023-04-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:986 + const FunctionDecl *FD = nullptr; + llvm::SmallVector Args; + tom-anders wrote: > Unfortunately, while CallExpr and CXXConstructExpr basically have the same > API for getting Ar

[PATCH] D148489: [clangd] Implement configs to stop clangd produce a certain semantic tokens

2023-05-22 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. (Do you plan to address the last comment before I merge?) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148489/new/ https://reviews.llvm.org/D148489 ___ cfe-commits mailing list c

[PATCH] D151190: [clangd] Do not end inactiveRegions range at position 0 of line

2023-05-23 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: hokein. Herald added subscribers: kadircet, arphaman. Herald added a project: All. nridge requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This carries

[PATCH] D150635: [clangd] Implement end-definition-comment inlay hints

2023-05-24 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/InlayHints.cpp:578 +constexpr unsigned HintMinLineLimit = 2; +constexpr unsigned HintMaxLengthLimit = 50; + daiyousei-qz wrote: > sammccall wrote: > > We actually already have a configurab

[PATCH] D148489: [clangd] Implement configs to stop clangd produce a certain semantic tokens

2023-05-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge accepted this revision. nridge added a comment. Thanks, LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148489/new/ https://reviews.llvm.org/D148489 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D148489: [clangd] Implement configs to stop clangd produce a certain semantic tokens

2023-05-26 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6feaa5416bf6: [clangd] Implement configs to stop clangd produce a certain semantic tokens (authored by daiyousei-qz, committed by nridge). Changed prior to commit: https://reviews.llvm.org/D148489?vs=5

[PATCH] D148489: [clangd] Implement configs to stop clangd produce a certain semantic tokens

2023-05-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. I went ahead and merged this. When you get a chance, could you update https://github.com/llvm/clangd-www/pull/85 as well so we can merge that too? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148489/new/ https://reviews.l

[PATCH] D151190: [clangd] Do not end inactiveRegions range at position 0 of line

2023-05-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge planned changes to this revision. nridge added inline comments. Comment at: clang-tools-extra/clangd/unittests/ClangdTests.cpp:1343 #undef CMDMACRO $inactive3[[#ifdef CMDMACRO int inactiveInt2; daiyousei-qz wrote: > hokein wrote: > > While this patch

[PATCH] D151190: [clangd] Do not end inactiveRegions range at position 0 of line

2023-05-29 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 526408. nridge added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151190/new/ https://reviews.llvm.org/D151190 Files: clang-tools-extra/clangd/ClangdServer.cpp clang-tool

[PATCH] D151190: [clangd] Do not end inactiveRegions range at position 0 of line

2023-05-29 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 526409. nridge added a comment. slight simplification Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151190/new/ https://reviews.llvm.org/D151190 Files: clang-tools-extra/clangd/ClangdServer.cpp clang-tools-

[PATCH] D151190: [clangd] Do not end inactiveRegions range at position 0 of line

2023-06-04 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 528189. nridge marked 3 inline comments as done. nridge added a comment. Herald added a subscriber: mgrang. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151190/new/ https://reviews.llvm.

[PATCH] D151190: [clangd] Do not end inactiveRegions range at position 0 of line

2023-06-04 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 528190. nridge added a comment. Add comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151190/new/ https://reviews.llvm.org/D151190 Files: clang-tools-extra/clangd/ClangdServer.cpp clang-tools-extra/clan

[PATCH] D143436: [clangd] Apply standard adaptors to CDBs pushed from LSP

2023-02-11 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Note that D138546 is removing the call to `inferTargetAndDriverMode()` from `GlobalCompilationDatabase.cpp`. It adds equivalent logic too `CommandMangler` which is used for CDBs pushed from LSP as well, so it accomplishes objective of t

[PATCH] D143260: [clangd] Add semantic token for labels

2023-02-13 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. FWIW, I agree that switch labels and goto labels are conceptually quite different: the thing before a switch label is an expression, and if it's an identifier it references an already-declared entity with its own kind (e.g. enumerator), whereas a goto label basically dec

[PATCH] D143260: [clangd] Add semantic token for labels

2023-02-13 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Another potential consideration here is the GNU "labels as values " language extension, which clang seems to support, and which allows referencing a `LabelDecl` from a context other than a goto-statement (and thus

[PATCH] D143974: [clangd] Inactive regions support via dedicated protocol

2023-02-13 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added reviewers: sammccall, kadircet, hokein. Herald added a subscriber: arphaman. Herald added a project: All. nridge requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. T

[PATCH] D143974: [clangd] Inactive regions support via dedicated protocol

2023-02-13 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Corresponding client-side support is implemented for vscode in the latest version of https://github.com/clangd/vscode-clangd/pull/193. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143974/new/ https://reviews.llvm.org/D1439

[PATCH] D143436: [clangd] Apply standard adaptors to CDBs pushed from LSP

2023-02-16 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/CompileCommands.cpp:222 + tooling::addExpandedResponseFiles(Cmd, Command.Directory, Tokenizer, *FS); + tooling::addTargetAndModeForProgramName(Cmd, Cmd.front()); auto &OptTable = clang::driver::getDriverOptTa

[PATCH] D143436: [clangd] Apply standard adaptors to CDBs pushed from LSP

2023-02-16 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/CompileCommands.cpp:222 + tooling::addExpandedResponseFiles(Cmd, Command.Directory, Tokenizer, *FS); + tooling::addTargetAndModeForProgramName(Cmd, Cmd.front()); auto &OptTable = clang::driver::getDriverOptTa

[PATCH] D143436: [clangd] Apply standard adaptors to CDBs pushed from LSP

2023-02-20 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/CompileCommands.cpp:222 + tooling::addExpandedResponseFiles(Cmd, Command.Directory, Tokenizer, *FS); + tooling::addTargetAndModeForProgramName(Cmd, Cmd.front()); auto &OptTable = clang::driver::getDriverOptTa

[PATCH] D144453: [clangd] Fix a bug in TweakTest::decorate()

2023-02-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. nridge requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. The second argument

[PATCH] D141757: [clangd] allow extracting to variable for complete lambda expressions

2023-02-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:84 + // Local variables declared inside of the selected lambda cannot go out of + // scope. The DeclRefExprs that are important are the lambda captures and + // capture var i

[PATCH] D141757: [clangd] allow extracting to variable for complete lambda expressions

2023-02-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:86 + // capture var intitializers. + if (const auto *const LExpr = llvm::dyn_cast(Expr)) { +FindDeclRefsVisitor Visitor; On the other hand, the exclusion

[PATCH] D143436: [clangd] Apply standard adaptors to CDBs pushed from LSP

2023-02-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/CompileCommands.cpp:222 + tooling::addExpandedResponseFiles(Cmd, Command.Directory, Tokenizer, *FS); + tooling::addTargetAndModeForProgramName(Cmd, Cmd.front()); auto &OptTable = clang::driver::getDriverOptTa

[PATCH] D144074: [clangd] Hide inlay hints when using a macro as a calling argument that with a param comment

2023-02-23 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/InlayHints.cpp:520 auto ExprStartLoc = SM.getTopMacroCallerLoc(E->getBeginLoc()); -auto Decomposed = SM.getDecomposedLoc(ExprStartLoc); +auto Decomposed = SM.getDecomposedExpansionLoc(ExprStartLoc);

[PATCH] D144703: [clangd] Avoid using CompletionItemKind.Text for macro completions

2023-02-23 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added reviewers: kadircet, hokein. Herald added a subscriber: arphaman. Herald added a project: All. nridge requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Fixes https:

[PATCH] D144703: [clangd] Avoid using CompletionItemKind.Text for macro completions

2023-02-24 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 500087. nridge added a comment. use Constant rather than Variable for object-like macros Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144703/new/ https://reviews.llvm.org/D144703 Files: clang-tools-extra/cla

[PATCH] D144703: [clangd] Avoid using CompletionItemKind.Text for macro completions

2023-02-24 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc4972d37290f: [clangd] Avoid using CompletionItemKind.Text for macro completions (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144703/n

[PATCH] D148457: [clangd] Support macro evaluation on hover

2023-05-06 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Thanks for the update, and thank you Sam for the suggestions! In D148457#4307402 , @sammccall wrote: > A couple of ideas: > > - special-case alignof > - (generalization) allow partial selection via macros that expand to a single

[PATCH] D147905: [clangd] Avoid passing -xobjective-c++-header to the system include extractor

2023-05-06 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. A user on Discord just ran into this again; I'd like to try and find a way forward with this mitigation. Since we haven't heard from @dgoldman, I'd like to explore an alternative st

[PATCH] D148489: [clangd] Implement configs to stop clangd produce a certain semantic tokens

2023-05-07 Thread Nathan Ridge via Phabricator via cfe-commits
nridge requested changes to this revision. nridge added a comment. This revision now requires changes to proceed. Thanks for the patch! I think this is a nice and general solution, which rather than solving just a specific problem (e.g. highlighting of `new` as an operator vs. a keyword), gives

[PATCH] D148489: [clangd] Implement configs to stop clangd produce a certain semantic tokens

2023-05-08 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:400 + bool ActiveKindLookup[static_cast(HighlightingKind::LastKind) + 1]; + uint32_t ActiveModifiersMask; +}; daiyousei-qz wrote: > nridge wrote: > > For good measure, l

[PATCH] D148457: [clangd] Support macro evaluation on hover

2023-05-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge accepted this revision. nridge added a comment. This revision is now accepted and ready to land. Thanks! LGTM with one final nit (the other comment is just food for future thought) Comment at: clang-tools-extra/clangd/Hover.cpp:503 + +std::optional printExprValue(const

[PATCH] D143260: [clangd] Add semantic token for labels

2023-05-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D143260#4328948 , @kadircet wrote: > Considering that we have added a bunch of token kinds, let me ask you another > question then, how many more new token kinds do we expect to have? e.g. if > label is the last one sure, but

[PATCH] D148489: [clangd] Implement configs to stop clangd produce a certain semantic tokens

2023-05-16 Thread Nathan Ridge via Phabricator via cfe-commits
nridge accepted this revision. nridge added a comment. This revision is now accepted and ready to land. Thanks! Let me know if you need me to commit. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:406 public: - HighlightingsBuilder(const ParsedAST &AST, bool In

[PATCH] D148284: [clangd] Add "readonly" token to const member expressions

2023-05-17 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:1018 +const auto BaseType = E->getBaseType(); +if ((E->isArrow() && BaseType->getPointeeType().isConstQualified()) || +(!E->isArrow() && BaseType.isConstQualified())) -

<    7   8   9   10   11   12   13   14   >