[clang-tools-extra] [clangd] Fix is spelled in source bug (PR #76668)

2024-01-07 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/76668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Fix is spelled in source bug (PR #76668)

2024-01-07 Thread Nathan Ridge via cfe-commits
@@ -813,6 +813,18 @@ TEST(SourceCodeTests, isKeywords) { EXPECT_FALSE(isKeyword("override", LangOpts)); } +TEST(SourceCodeTests, isSpelledInSource) { + Annotations Test(""); + ParsedAST AST = TestTU::withCode(Test.code()).build(); + const SourceManager &SM = AST.getSource

[clang] [clang] Bounds checking on unclosed parentheses, brackets or braces in Expanded Tokens (PR #69849)

2024-01-08 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: I poked at this a bit more. A few more notes: * Since the test case currently in the patch does not trigger the crash (without the fix), and it was not obvious to me what sort of call to `spelledForExpanded()` to formulate to trigger the crash, I instead formulated a te

[clang] [clang] Bounds checking on unclosed parentheses, brackets or braces in Expanded Tokens (PR #69849)

2024-01-08 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Anyways, in a case like this, this preferable behaviour would be for `spelledForExpanded()` to return the spelled tokens covering `int main() {` (not including the `eof` token but including everything else), **not** nullopt. https://github.com/llvm/llvm-project/pull/69849

[clang] [clang] Bounds checking on unclosed parentheses, brackets or braces in Expanded Tokens (PR #69849)

2024-01-08 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I am slightly suspicious of source locations pointing at `eof` in the AST in > the first place, even in invalid code. I wonder if we would be better off > just having an invalid source location there instead of pointing at `eof`. I think in this case it's deliberate. If

[clang-tools-extra] [clangd] Fix typo (PR #77504)

2024-01-09 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/77504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Fix typo (PR #77504)

2024-01-09 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/77504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] lsOutgoing calls (PR #77556)

2024-01-09 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/77556 None >From 42d64ab78fe1c001e766fe2b94de167ae7bc6ddf Mon Sep 17 00:00:00 2001 From: Quentin Chateau Date: Mon, 18 Sep 2023 03:01:03 -0400 Subject: [PATCH 1/4] [clangd] Support outgoing calls in call hierar

[clang-tools-extra] lsOutgoing calls (PR #77556)

2024-01-09 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (Not sure what happened here, the PR was somehow created while I was still writing the description. Anyways, updating the title now.) https://github.com/llvm/llvm-project/pull/77556 ___ cfe-commits mailing list cfe-commits@lists.

[clang-tools-extra] [clangd] Support outgoing calls in call hierarchy (PR #77556)

2024-01-09 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/77556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Support outgoing calls in call hierarchy (PR #77556)

2024-01-09 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Since Phabricator has been [taken down](https://discourse.llvm.org/t/llvm-phabricator-turndown/76137), I'm resubmitting the patch implementing outgoing calls in call hierarchy that was previously posted at https://reviews.llvm.org/D93829. Previous discussion can still be

[clang-tools-extra] [clangd] Handle lambda scopes inside Node::getDeclContext() (PR #76329)

2024-01-10 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Shouldn't it be placed on a new line? I think what may be happening here is that the refactorings try to avoid duplicating the work of the formatter, and just generate syntactically valid code that the formatter will then format according to the codebase's clang-format

[clang-tools-extra] c09e533 - [clangd] Also mark output arguments of operator call expressions

2022-06-29 Thread Nathan Ridge via cfe-commits
Author: Christian Kandeler Date: 2022-06-29T20:12:37-04:00 New Revision: c09e533374139f17a040040ffdb03ea20fac2736 URL: https://github.com/llvm/llvm-project/commit/c09e533374139f17a040040ffdb03ea20fac2736 DIFF: https://github.com/llvm/llvm-project/commit/c09e533374139f17a040040ffdb03ea20fac2736.

[clang-tools-extra] ac511fd - [clangd] Also mark output arguments of array subscript expressions

2022-07-01 Thread Nathan Ridge via cfe-commits
Author: Christian Kandeler Date: 2022-07-01T04:45:20-04:00 New Revision: ac511fd4392d0f1fad3852378adf3c80738016b7 URL: https://github.com/llvm/llvm-project/commit/ac511fd4392d0f1fad3852378adf3c80738016b7 DIFF: https://github.com/llvm/llvm-project/commit/ac511fd4392d0f1fad3852378adf3c80738016b7.

[clang-tools-extra] b1fbc05 - [clangd] Support "usedAsMutableReference" in member initializations

2022-07-08 Thread Nathan Ridge via cfe-commits
Author: Christian Kandeler Date: 2022-07-08T23:16:20-04:00 New Revision: b1fbc0519c5224de44b2711f8a813b24d767dd3e URL: https://github.com/llvm/llvm-project/commit/b1fbc0519c5224de44b2711f8a813b24d767dd3e DIFF: https://github.com/llvm/llvm-project/commit/b1fbc0519c5224de44b2711f8a813b24d767dd3e.

[clang] 56a5491 - [clang] Propagate requires-clause from constructor template to implicit deduction guide

2022-03-24 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2022-03-25T02:46:22-04:00 New Revision: 56a54910c5978947adfcf230f360a15b34c0e32e URL: https://github.com/llvm/llvm-project/commit/56a54910c5978947adfcf230f360a15b34c0e32e DIFF: https://github.com/llvm/llvm-project/commit/56a54910c5978947adfcf230f360a15b34c0e32e.diff

[clang-tools-extra] 9325e97 - [clangd] Handle tabs in getIncrementalChangesAfterNewline()

2022-03-28 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2022-03-29T01:43:09-04:00 New Revision: 9325e97a3599929a52bef3e5c8e403c98f9428ba URL: https://github.com/llvm/llvm-project/commit/9325e97a3599929a52bef3e5c8e403c98f9428ba DIFF: https://github.com/llvm/llvm-project/commit/9325e97a3599929a52bef3e5c8e403c98f9428ba.diff

[clang] 08b2898 - [clang] Respect PrintingPolicy::FullyQualifiedName when printing a template-id

2021-07-19 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2021-07-19T17:31:51-04:00 New Revision: 08b289867b5adb45033db501461915234e9e1bd4 URL: https://github.com/llvm/llvm-project/commit/08b289867b5adb45033db501461915234e9e1bd4 DIFF: https://github.com/llvm/llvm-project/commit/08b289867b5adb45033db501461915234e9e1bd4.diff

[clang-tools-extra] f443793 - [clangd] Ensure Ref::Container refers to an indexed symbol

2021-07-22 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2021-07-22T03:33:40-04:00 New Revision: f443793d26c39a78cfedea5a8cc2ad23e1253d84 URL: https://github.com/llvm/llvm-project/commit/f443793d26c39a78cfedea5a8cc2ad23e1253d84 DIFF: https://github.com/llvm/llvm-project/commit/f443793d26c39a78cfedea5a8cc2ad23e1253d84.diff

[clang-tools-extra] 606ba8a - [clangd] Handle more than two conflicting semantic tokens in resolveConflict()

2022-03-16 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2022-03-16T12:53:04-04:00 New Revision: 606ba8a68f79b8324c3ce018e7fa0173ce698526 URL: https://github.com/llvm/llvm-project/commit/606ba8a68f79b8324c3ce018e7fa0173ce698526 DIFF: https://github.com/llvm/llvm-project/commit/606ba8a68f79b8324c3ce018e7fa0173ce698526.diff

[clang-tools-extra] e500062 - [clangd] Fix incorrect operator< impl for HighlightingToken

2022-04-13 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2022-04-13T03:19:48-04:00 New Revision: e5000624933e11e56a1530f1561efa136c9c8bd7 URL: https://github.com/llvm/llvm-project/commit/e5000624933e11e56a1530f1561efa136c9c8bd7 DIFF: https://github.com/llvm/llvm-project/commit/e5000624933e11e56a1530f1561efa136c9c8bd7.diff

[clang-tools-extra] 56058b9 - [clangd] Output inlay hints with `clangd --check`

2022-04-26 Thread Nathan Ridge via cfe-commits
Author: Tobias Ribizel Date: 2022-04-27T02:36:09-04:00 New Revision: 56058b921bd9b9e14697fb6108903836f7f9c328 URL: https://github.com/llvm/llvm-project/commit/56058b921bd9b9e14697fb6108903836f7f9c328 DIFF: https://github.com/llvm/llvm-project/commit/56058b921bd9b9e14697fb6108903836f7f9c328.diff

[clang-tools-extra] 043e965 - [clangd] Add inlay hints for mutable reference parameters

2022-05-02 Thread Nathan Ridge via cfe-commits
Author: Tobias Ribizel Date: 2022-05-02T15:57:23-04:00 New Revision: 043e9650240866701bee89922d54bf7af059ed30 URL: https://github.com/llvm/llvm-project/commit/043e9650240866701bee89922d54bf7af059ed30 DIFF: https://github.com/llvm/llvm-project/commit/043e9650240866701bee89922d54bf7af059ed30.diff

[clang] 3f73c57 - Argument name support for function pointer signature hints

2022-07-19 Thread Nathan Ridge via cfe-commits
Author: Qwinci Date: 2022-07-19T20:02:26-04:00 New Revision: 3f73c5793515867935d59ff8c511c61ace848e79 URL: https://github.com/llvm/llvm-project/commit/3f73c5793515867935d59ff8c511c61ace848e79 DIFF: https://github.com/llvm/llvm-project/commit/3f73c5793515867935d59ff8c511c61ace848e79.diff LOG: A

[clang-tools-extra] 2eba08f - [clangd] Do not try to use $0 as a placeholder in completion snippets

2022-07-24 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2022-07-24T03:01:18-04:00 New Revision: 2eba08fd9a5f42efb64ee8cc5ee0edebd8ce4bc0 URL: https://github.com/llvm/llvm-project/commit/2eba08fd9a5f42efb64ee8cc5ee0edebd8ce4bc0 DIFF: https://github.com/llvm/llvm-project/commit/2eba08fd9a5f42efb64ee8cc5ee0edebd8ce4bc0.diff

[clang] df2a4ea - [clang] Expose CoawaitExpr's operand in the AST

2022-05-17 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2022-05-17T08:13:37-04:00 New Revision: df2a4eae6b190806c0b96ef3312975e1c97dbda0 URL: https://github.com/llvm/llvm-project/commit/df2a4eae6b190806c0b96ef3312975e1c97dbda0 DIFF: https://github.com/llvm/llvm-project/commit/df2a4eae6b190806c0b96ef3312975e1c97dbda0.diff

[clang-tools-extra] 175833e - [clangd] Handle '--' in QueryDriverDatabase

2022-05-24 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2022-05-24T13:10:41-04:00 New Revision: 175833ed6f62b697ce6248930da54e4ddb7f4c00 URL: https://github.com/llvm/llvm-project/commit/175833ed6f62b697ce6248930da54e4ddb7f4c00 DIFF: https://github.com/llvm/llvm-project/commit/175833ed6f62b697ce6248930da54e4ddb7f4c00.diff

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-15 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/83369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-15 Thread Nathan Ridge via cfe-commits
@@ -72,6 +72,22 @@ TEST_F(ExtractVariableTest, Test) { )cpp"; EXPECT_UNAVAILABLE(NoCrashCasesC); + ExtraArgs = {"-xc"}; + const char *NoCrashDesignator = R"cpp( +struct A { + struct { +int x; + }; +}; +struct B { + int y; +}; +

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-15 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/83369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-15 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/83369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-16 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/83369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Handle variables templates consistently with class templates in code completion (PR #85740)

2024-03-18 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/85740 The option --function-arg-placeholders=0 results in placeholders being omitted for class template argument lists. This patch extends the same treatment to variable template argument lists. Fixes https://

[clang-tools-extra] [clangd] Support outgoing calls in call hierarchy (PR #77556)

2024-03-24 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Shopping around for some potential alternative reviewers :) https://github.com/llvm/llvm-project/pull/77556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeComplete] Handle deref operator in getApproximateType (PR #86466)

2024-03-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/86466 This allows completing after `(*this).` in a dependent context. Fixes https://github.com/clangd/clangd/issues/1952 >From 6cac58d2e5c3c7effc0f0cc01c1368b9ddd6c21a Mon Sep 17 00:00:00 2001 From: Nathan Ridg

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The protocol part (PR #85497)

2024-03-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/85497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The protocol part (PR #85497)

2024-03-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 commented: Thanks for the patch! https://github.com/llvm/llvm-project/pull/85497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The protocol part (PR #85497)

2024-03-25 Thread Nathan Ridge via cfe-commits
@@ -367,7 +367,13 @@ class Checker { auto Hints = inlayHints(*AST, LineRange); for (const auto &Hint : Hints) { - vlog(" {0} {1} {2}", Hint.kind, Hint.position, Hint.label); + vlog(" {0} {1} [{2}]", Hint.kind, Hint.position, [&] { +return llvm::join

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The protocol part (PR #85497)

2024-03-25 Thread Nathan Ridge via cfe-commits
@@ -1483,9 +1483,18 @@ llvm::json::Value toJSON(const InlayHintKind &Kind) { llvm_unreachable("Unknown clang.clangd.InlayHintKind"); } +namespace { + +llvm::json::Array toJSON(const std::vector &Labels) { + return llvm::json::Array{ + llvm::map_range(Labels, [](auto &L

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The protocol part (PR #85497)

2024-03-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/85497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeComplete] Handle deref operator in getApproximateType (PR #86466)

2024-03-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/86466 >From 73d2082c164ba629babec3cc3dc9b1d06b41ec60 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 25 Mar 2024 02:14:00 -0400 Subject: [PATCH] [clang][CodeComplete] Handle deref operator in getApproxim

[clang] [clang][CodeComplete] Handle deref operator in getApproximateType (PR #86466)

2024-03-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/86466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeComplete] Handle deref operator in getApproximateType (PR #86466)

2024-03-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/86466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Support outgoing calls in call hierarchy (PR #77556)

2024-03-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I think other than the review it would be 100% done? I mean, no big further > modifications would be involved? In terms of functionality, I'd say the patch is complete. In terms of performance (and specifically memory usage), it's a matter of judgment of what we consid

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-03-31 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Related issue: https://github.com/clangd/clangd/issues/1774 https://github.com/llvm/llvm-project/pull/87208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] forward clang-tidy's readability-identifier-naming fix to textDocument/rename (PR #78454)

2024-02-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Ok, I had a more detailed look at the implementation. Still looks good overall, just have some minor comments. https://github.com/llvm/llvm-project/pull/78454 ___ cfe-commits ma

[clang-tools-extra] [clangd] forward clang-tidy's readability-identifier-naming fix to textDocument/rename (PR #78454)

2024-02-10 Thread Nathan Ridge via cfe-commits
@@ -648,6 +649,27 @@ tweakSelection(const Range &Sel, const InputsAndAST &AST, return std::move(Result); } +// Some fixes may perform local renaming, we want to convert those to clangd +// rename commands, such that we can leverage the index for more accurate +// results. +s

[clang-tools-extra] [clangd] forward clang-tidy's readability-identifier-naming fix to textDocument/rename (PR #78454)

2024-02-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/78454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] forward clang-tidy's readability-identifier-naming fix to textDocument/rename (PR #78454)

2024-02-10 Thread Nathan Ridge via cfe-commits
@@ -648,6 +649,27 @@ tweakSelection(const Range &Sel, const InputsAndAST &AST, return std::move(Result); } +// Some fixes may perform local renaming, we want to convert those to clangd +// rename commands, such that we can leverage the index for more accurate +// results. +s

[clang-tools-extra] [clangd] forward clang-tidy's readability-identifier-naming fix to textDocument/rename (PR #78454)

2024-02-10 Thread Nathan Ridge via cfe-commits
@@ -648,6 +649,27 @@ tweakSelection(const Range &Sel, const InputsAndAST &AST, return std::move(Result); } +// Some fixes may perform local renaming, we want to convert those to clangd +// rename commands, such that we can leverage the index for more accurate +// results. +s

[clang-tools-extra] [clangd] forward clang-tidy's readability-identifier-naming fix to textDocument/rename (PR #78454)

2024-02-11 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Something else I noticed while trying out the patch locally: before the patch, the description of the quick fix in the editor is "change 'foo' to 'Foo'", i.e. a description of what the code action will do. After the patch, the description of the quick fix is now "invalid

[clang-tools-extra] [clangd] forward clang-tidy's readability-identifier-naming fix to textDocument/rename (PR #78454)

2024-02-11 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (It's also no longer labelled as a "quick fix", likely due to the `CodeActionKind` changing from `quickfix` to `refactor`, but that's probably fine.) https://github.com/llvm/llvm-project/pull/78454 ___ cfe-commits mailing list c

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-02-13 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/81662 Passing AcceptInvalidDecl=true to BuildDeclarationNameExpr() allows the RecoveryExpr that's constructed to retain a DeclRefExpr pointing to the invalid decl as a child, preserving information about the re

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-02-13 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 converted_to_draft https://github.com/llvm/llvm-project/pull/81662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-02-13 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Changing to Draft status as CI is showing some test failures that I will need to investigate: ``` Failed Tests (4): Clang :: OpenMP/nvptx_unsupported_type_messages.cpp Clang :: SemaCXX/constant-expression-cxx11.cpp Clang :: SemaCXX/cxx2b-consteval-if.cpp Clang :: S

[clang-tools-extra] [clangd] Make all calls to format::getStyle() go through getFormatStyleForFile() (PR #82948)

2024-03-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/82948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Remove calls to getFileLoc() in declToSym() (PR #83532)

2024-03-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/83532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] clangd: Show argument names for function pointer struct fields (PR #69011)

2024-03-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/69011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] clangd: Show argument names for function pointer struct fields (PR #69011)

2024-03-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/69011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-06 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/84133 This avoids a known libFormat bug where the heuristic can OOM on certain large files (particularly single-header libraries such as miniaudio.h). The OOM will still happen on affected files if you actually

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-06 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: For additional context, please refer to the discussion of https://github.com/llvm/llvm-project/pull/78925, which was my first attempt to fix these bugs using a different approach https://github.com/llvm/llvm-project/pull/84133 _

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-06 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/84133 >From e6db271ca93d4c1d8a192bd1ac9e3809b4a3a2a9 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 25 Feb 2024 19:55:10 -0500 Subject: [PATCH] [clangd] Avoid libFormat's objective-c guessing heuristic

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-03-06 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I've merged #82957. Thanks. I've written the clangd patch and posted it for review at https://github.com/llvm/llvm-project/pull/84133. If that gets approved, I will abandon this PR. https://github.com/llvm/llvm-project/pull/78925 ___

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/84133 >From 9c3a4ab81e931f43104fa0ac26de56595f43c6b4 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 25 Feb 2024 19:55:10 -0500 Subject: [PATCH] [clangd] Avoid libFormat's objective-c guessing heuristic

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-11 Thread Nathan Ridge via cfe-commits
@@ -166,14 +166,29 @@ TextEdit toTextEdit(const FixItHint &FixIt, const SourceManager &M, std::optional getCanonicalPath(const FileEntryRef F, FileManager &FileMgr); +/// A flag passed to getFormatStyleForFile() that specifies what

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-11 Thread Nathan Ridge via cfe-commits
@@ -166,14 +166,29 @@ TextEdit toTextEdit(const FixItHint &FixIt, const SourceManager &M, std::optional getCanonicalPath(const FileEntryRef F, FileManager &FileMgr); +/// A flag passed to getFormatStyleForFile() that specifies what

[clang-tools-extra] [clangd] Avoid libFormat's objective-c guessing heuristic where possible (PR #84133)

2024-03-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/84133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-03-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/78925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-03-11 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Thanks. I've written the clangd patch and posted it for review at #84133. > > If that gets approved, I will abandon this PR. #84133 has merged now. I'll accordingly close this. Thank you @owenca for your feedback and helping reach a solution that accomplished the goals

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-12 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/83369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-12 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Thanks for the patch! I wrote some notes in the issue (https://github.com/llvm/llvm-project/issues/83185) to help me understand the problem the patch is fixing. The fix looks good to me. Regarding the test: * Usually

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-12 Thread Nathan Ridge via cfe-commits
@@ -4601,8 +4601,15 @@ SourceRange DesignatedInitExpr::getDesignatorsSourceRange() const { SourceLocation DesignatedInitExpr::getBeginLoc() const { auto *DIE = const_cast(this); Designator &First = *DIE->getDesignator(0); - if (First.isFieldDesignator()) -return GNUSy

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-02-24 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I thought the `GuessObjC` flag would allow clangd to skip the guessing ObjC > part for those "users who merely use these libraries (and so may open them in > the editor to look at the header, but will not try to format it)". Ok, I see what you're getting at. Clangd cal

[clang-tools-extra] [clangd] Make all calls to format::getStyle() go through getFormatStyleForFile() (PR #82948)

2024-02-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/82948 None >From e0cb66c8313c8ff1a934dc222165040de656b71e Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 25 Feb 2024 19:24:31 -0500 Subject: [PATCH] [clangd] Make all calls to format::getStyle() go thro

[clang-tools-extra] [clangd] Make all calls to format::getStyle() go through getFormatStyleForFile() (PR #82948)

2024-02-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (This patch is in preparation for a fix for https://github.com/clangd/clangd/issues/1384, which I haven't posted yet because I haven't figured out how to do stacked PRs yet. However, this patch seems independently useful and reviewable.) https://github.com/llvm/llvm-proj

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-02-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > @HighCommander4 see #82911 Thanks. I've prototyped the clangd changes on top of this, and it seem to be working (i.e. successfully avoiding the OOM for workflows that don't involve formatting the file). I've pushed the changes to my fork at https://github.com/HighComma

[clang] [clang-tools-extra] clangd: Show argument names for function pointer struct fields (PR #69011)

2024-02-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Thanks for the update! Looks good with a final nit. https://github.com/llvm/llvm-project/pull/69011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [clang-tools-extra] clangd: Show argument names for function pointer struct fields (PR #69011)

2024-02-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/69011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] clangd: Show argument names for function pointer struct fields (PR #69011)

2024-02-25 Thread Nathan Ridge via cfe-commits
@@ -6143,6 +6144,13 @@ static FunctionProtoTypeLoc GetPrototypeLoc(Expr *Fn) { } } + if (const auto *ME = dyn_cast(Fn)) { HighCommander4 wrote: nit: make this an `else if` (i.e. make it part of the chain just above), and then the `!Target` condition b

[clang-tools-extra] [clangd] Support outgoing calls in call hierarchy (PR #77556)

2024-02-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: @sam-mccall review ping :) https://github.com/llvm/llvm-project/pull/77556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Limit how much work guessLanguage() can do (PR #78925)

2024-02-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > @HighCommander4 I got a better idea. It seems that we don't need to add the > parameter! See #82957. I think all you need to do is to call `getStyle()` > with the default `""` for the `StringRef Code` argument to skip the > Objective-C guesser. Thanks. That does seem s

[clang-tools-extra] [clangd] Remove calls to getFileLoc() in declToSym() (PR #83532)

2024-02-29 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/83532 toHalfOpenFileRange() already handles translating macro locations to file locations, and it can provide a better result by knowing about both ends of the range. Fixes https://github.com/clangd/clangd/iss

[clang-tools-extra] [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (PR #83542)

2024-03-01 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/83542 Fixes https://github.com/clangd/clangd/issues/1951 >From 0ad99c63ab1482c28f5226f8611798c035493495 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Fri, 1 Mar 2024 03:27:51 -0500 Subject: [PATCH] [clangd]

[clang-tools-extra] [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (PR #83542)

2024-03-02 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > here is my analysis: > > (Let's use the example from your test case) > > ```c++ > template > struct waldo { > using type = waldo::type::next; > }; > ``` > > So, we're somehow attempting to resolve the type/decl for `next`, which is of > `DependentNameType`. To achie

[clang-tools-extra] [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (PR #83542)

2024-03-03 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/83542 >From 1495cd55329d9d9d6ef7f61a9dc3f3cc48a72dac Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Fri, 1 Mar 2024 03:27:51 -0500 Subject: [PATCH] [clangd] [HeuristicResolver] Protect against infinite recur

[clang-tools-extra] [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (PR #83542)

2024-03-03 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/83542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (PR #83542)

2024-03-03 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Updated patch with two changes: * Added the `even`/`odd` exampls as a second test case * Elaborated on the problem and solution in the commit message https://github.com/llvm/llvm-project/pull/83542 ___ cfe-commits mailing list

[clang-tools-extra] [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (PR #83542)

2024-03-03 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I don't have any other concerns about the refactor, so feel free to land it > or wait for other folks' opinions. Thank you for reviewing! I'm going to merge this sooner rather than later, since due to the severe nature of the bug (crash on standard library headers), I'

[clang-tools-extra] [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (PR #83542)

2024-03-03 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/83542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] forward clang-tidy's readability-identifier-naming fix to textDocument/rename (PR #78454)

2024-01-31 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Duplicate issue: > [clangd/clangd#741](https://github.com/clangd/clangd/issues/741) Nice find, I closed it as a duplicate. https://github.com/llvm/llvm-project/pull/78454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-02-01 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Do you have another patch where you use the new `DocComment` field? Is it for showing in a hover? https://github.com/llvm/llvm-project/pull/67802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang-tools-extra] [clang] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-02-01 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Ok, I see. (I was confused because nothing in the patch looks at the contents of `Symbol::DocComment` other than an `empty()` check; maybe a `bool HasDocComment` flag is sufficient?) I'll have a more detailed look when I get a chance, but one suggestion I wanted to make

[clang-tools-extra] [clangd] Handle IndirectFieldDecl in kindForDecl (PR #80588)

2024-02-03 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/80588 Fixes https://github.com/clangd/clangd/issues/1925 >From c374bd790eed3bac6ee1618e2a4976d6c0c53b5c Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 4 Feb 2024 02:22:38 -0500 Subject: [PATCH] [clangd]

[clang-tools-extra] [clangd] Handle IndirectFieldDecl in kindForDecl (PR #80588)

2024-02-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/80588 >From a2f622aa59d0bd2d2220ae08a6c3e26dd794e2e0 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 4 Feb 2024 02:22:38 -0500 Subject: [PATCH] [clangd] Handle IndirectFieldDecl in kindForDecl https://gi

[clang-tools-extra] [clangd] Handle IndirectFieldDecl in kindForDecl (PR #80588)

2024-02-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/80588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] forward clang-tidy's readability-identifier-naming fix to textDocument/rename (PR #78454)

2024-02-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Looks pretty good! Are there further changes you're planning to make, or is this ready to graduate from "Draft" status? https://github.com/llvm/llvm-project/pull/78454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

2024-01-26 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Sorry, I'm still struggling with Github reviews compared to Phabricator... how do I get to an interdiff showing the latest version of the patch compared to the version I reviewed? https://github.com/llvm/llvm-project/pull/67749

[clang-tools-extra] silence clang-tidy warning (llvm-qualified-auto) (PR #79617)

2024-01-26 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. https://github.com/llvm/llvm-project/pull/79617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] silence clang-tidy warning (llvm-qualified-auto) (PR #79617)

2024-01-26 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/79617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

2024-01-27 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > The compare button is a bit useless when it has a bunch of changes from main > on it > (https://github.com/llvm/llvm-project/compare/8a2b22e69f82e3f4caa271b57b998d1c03b21d39..67971ca27ef5e2767aba5cfe2cec1021c4de5ec1) Thanks. Yeah, it looks like the "Compare" link next t

<    1   2   3   4   5   6   7   8   9   10   >