Re: [clang-tools-extra] r351788 - [clangd] Filter out plugin related flags and move all commandline manipulations into OverlayCDB.

2019-01-23 Thread Kadir Çetinkaya via cfe-commits
Hey Hans, There is actually a parent for this patch at https://reviews.llvm.org/rC351531 and it hasn't been merged. In addition to that not exactly as a follow-up, but there is https://reviews.llvm.org/rCTE351738 which is kind of related to this two patches, you might also consider merging that b

Re: [clangd] Print template arguments helper

2019-04-12 Thread Kadir Çetinkaya via cfe-commits
Thanks Bruno, sent out rL358293 to address the issue. On Fri, Apr 12, 2019 at 5:21 PM Bruno Ricci wrote: > Hi, > > It seems that one of r358272, r358273 or r358274 is causing some asan > failure on my machine. Not sure why it is not spotted by the bots. > > Failure log attached. > > Bruno >

Re: r358665 - [clang][CIndex] Use llvm::set_thread_priority

2019-04-23 Thread Kadir Çetinkaya via cfe-commits
Thanks for the fix Nico! On Sun, Apr 21, 2019 at 9:17 PM Nico Weber wrote: > r358858 might help with this. > > On Sat, Apr 20, 2019 at 7:15 PM Nico Weber wrote: > >> This breaks building with LLVM_ENABLE_THREADS=OFF. The call probably >> needs to be behind a `#if LLVM_ENABLE_THREADS`. >> >> FAI

Re: [clang-tools-extra] r366458 - [clangd] Refactor background-index shard loading

2019-07-19 Thread Kadir Çetinkaya via cfe-commits
Hi Azhar, D64980 should fix the problem. I am reverting your revert while adding the fix in r366559. On Fri, Jul 19, 2019 at 11:29 AM Azhar Mohammed wrote: > Reverted in r366551. > > > Revert r366458, r366467 and r366468 > > r366458 is causing test failures. r366467 and r366468 had to be

Re: [clang-tools-extra] r365123 - [clangd] Make HadErrors part of background index's internal state

2019-07-04 Thread Kadir Çetinkaya via cfe-commits
https://reviews.llvm.org/rL365140 should fix it, please let me know if it doesnt. On Thu, Jul 4, 2019 at 3:45 PM wrote: > Hi Kadir, > > Your change is causing a build failure on our internal linux build bot > running gcc 5.4: > > FAILED: CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache > /usr/

Re: [clang-tools-extra] r374163 - [clangd] Propagate context into reply handlers

2019-10-09 Thread Kadir Çetinkaya via cfe-commits
thanks! sent out D68702. On Wed, Oct 9, 2019 at 2:56 PM Nico Weber wrote: > Looks like this breaks three clangd tests on macOS: > > Failing Tests (3): > Clangd :: code-action-request.test > Clangd :: execute-command.test > Clangd :: tweaks-format.test > > libc++abi.dylib: terminating

Re: [PATCH] D77644: [clangd] Handle additional includes while parsing ASTs

2020-06-02 Thread Kadir Çetinkaya via cfe-commits
Hi Jan, I don't think there's much point in running ReplayPreamble with an empty preamble, but this should already be a no-op as there can't be any includes inside the preamble region if size is 0. I can't seem to reproduce a failure with the root causes you've provided. Even when ReplayPreamble:

Re: [PATCH] D77644: [clangd] Handle additional includes while parsing ASTs

2020-06-02 Thread Kadir Çetinkaya via cfe-commits
managed to reproduce the issue. sent out https://reviews.llvm.org/D80988 for a fix. On Tue, Jun 2, 2020 at 12:08 PM Sam McCall wrote: > On Tue, Jun 2, 2020 at 10:38 AM Kadir Çetinkaya > wrote: > >> Hi Jan, >> >> I don't think there's much point in running ReplayPreamble with an empty >> preambl

Re: [PATCH] D80293: [clangd] Run PreambleThread in async mode behind a flag

2020-06-02 Thread Kadir Çetinkaya via cfe-commits
thanks for letting me know. it is annoying that the test is flaky, but I don't see that flakiness on any other buildbot I've access to. Is there any chance that you are running in a custom build configuration that I can try to repro the failure? Also what's the falkiness ratio? On Tue, Jun 2, 202

Re: [PATCH] D63194: [clangd] Link and initialize target infos

2020-04-11 Thread Kadir Çetinkaya via cfe-commits
Hi Filipe! Thanks for letting me know, I've sent https://reviews.llvm.org/D77944 to enable this in clangd lit config. Regarding the failure, I can't seem to repro on machines I have access to. The premerge-tests also seems to be succeeding, please see https://results.llvm-merge-guard.org/BETA_amd6

Re: [PATCH] D77644: [clangd] Handle additional includes while parsing ASTs

2020-06-04 Thread Kadir Çetinkaya via cfe-commits
Hi Mikael, sent out 4f4a8ae72e95f2c7fa5e4ca56dd6b1a83a304680, please let me know if it helps! On Thu, Jun 4, 2020 at 12:40 PM Mikael Holmén via Phabricator < revi...@reviews.llvm.org> wrote: > uabelho added inline comments. > > > > Comment at: clang-tools-extra/clangd/CodeComple

Re: [clang-tools-extra] dffa9df - [clangd] Shard preamble symbols in dynamic index

2020-04-17 Thread Kadir Çetinkaya via cfe-commits
Thanks Mikael, 66b54d586fa73499714e2bfef3cedffeabb08f34 should fix this. On Fri, Apr 17, 2020 at 2:42 PM Mikael Holmén wrote: > Hi Kadir, > > I noticed in our buildbots that run with sanitizers that we got a new > complaint with this commit. It's still there on current top-of-tree now > so the

Re: [clang] 2214b90 - [clangd] Make signatureHelp work with stale preambles

2020-04-23 Thread Kadir Çetinkaya via cfe-commits
Thanks Mikael, sent out an ugly fix at 89cb5d558895706e053bc3af972aa5b15aa82863 to get sanitizer build bots running. Will change the testing scheme for a proper fix. On Thu, Apr 23, 2020 at 4:53 PM Mikael Holmén wrote: > Hi Kadir, > > I start seeing some sanitizer complaints with this commit fo

Re: [clang-tools-extra] 97c407d - [clangd] Make use of URIs in FileShardedIndex

2020-04-30 Thread Kadir Çetinkaya via cfe-commits
Thanks for bringing this up Jeremy, for some reason(I suppose due to the existing breakage in the bot) I haven't received any mails regarding this breakage. Sent out 2 patches, first one seemed to fix something, but wasn't enough. The bots have a really slow turnaround though, so it takes a while

Re: [PATCH] D79302: [clangd] Propogate context in LSPServer tests

2020-05-03 Thread Kadir Çetinkaya via cfe-commits
i was trying to provide a more generic "callback" mechanism, but you are right, it is not needed for this test. going to keep context prop logic though, as it might be necessary later on. SG? On Sun, May 3, 2020 at 9:09 PM Sam McCall via Phabricator < revi...@reviews.llvm.org> wrote: > sammccall

Re: [PATCH] D78429: [clangd] Metric tracking through Tracer

2020-05-04 Thread Kadir Çetinkaya via cfe-commits
thanks Hans! On Mon, May 4, 2020 at 12:38 PM Hans Wennborg via Phabricator < revi...@reviews.llvm.org> wrote: > hans added a comment. > > For anyone running into the same problem, this broke the build with GCC 5: > > /work/llvm.monorepo/clang-tools-extra/clangd/ClangdServer.cpp:374:75: > error:

Re: [PATCH] D78598: [clangd] Remove vscode plugin: now https://github.com/clangd/vscode-clangd

2020-05-11 Thread Kadir Çetinkaya via cfe-commits
yes that's the case. See https://github.com/clangd/vscode-clangd/pulls?q=is%3Apr On Mon, May 11, 2020 at 9:57 AM Nathan Ridge via Phabricator < revi...@reviews.llvm.org> wrote: > nridge added a comment. > > Also, does this mean that patches to vscode-clangd should now be submitted > as a Github P

[clang-tools-extra] [clangd] Improve sys header mapping (PR #72122)

2023-11-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/72122 None From a73b13d6fe7691a3d12840895ad56a859d5d9f9b Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Mon, 13 Nov 2023 15:52:21 +0100 Subject: [PATCH] [clangd] Improve sys header mapping --- clang-tools-ext

[clang-tools-extra] [include-cleaner] Add handling for FriendDecls (PR #72125)

2023-11-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/72125 Fixes https://github.com/llvm/llvm-project/issues/64382. From 8a96c67f70f9ae77d3e1576f49cd1ff7880e6e00 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Mon, 13 Nov 2023 16:20:01 +0100 Subject: [PATCH] [inc

[clang-tools-extra] [include-cleaner] Add handling for FriendDecls (PR #72125)

2023-11-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/72125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Improve sys header mapping (PR #72122)

2023-11-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/72122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] Make sure exports of stdlib also works for physical files (PR #72246)

2023-11-14 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/72246 This was creating discrepancy in cases where we might have a physical file entry (e.g. because we followed a source location from a stdlib file) and tried to find its exporters. From 49ea3ae3468c5d67b2b6b03339d

[clang-tools-extra] [include-cleaner] Make sure exports of stdlib also works for physical files (PR #72246)

2023-11-17 Thread kadir çetinkaya via cfe-commits
@@ -232,6 +232,17 @@ class PragmaIncludes::RecordPragma : public PPCallbacks, public CommentHandler { void checkForExport(FileID IncludingFile, int HashLine, std::optional IncludedHeader, OptionalFileEntryRef IncludedFile) { +a

[clang-tools-extra] [include-cleaner] Make sure exports of stdlib also works for physical files (PR #72246)

2023-11-17 Thread kadir çetinkaya via cfe-commits
@@ -232,6 +232,17 @@ class PragmaIncludes::RecordPragma : public PPCallbacks, public CommentHandler { void checkForExport(FileID IncludingFile, int HashLine, std::optional IncludedHeader, OptionalFileEntryRef IncludedFile) { +a

[clang-tools-extra] [include-cleaner] Make sure exports of stdlib also works for physical files (PR #72246)

2023-11-17 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/72246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] Make sure exports of stdlib also works for physical files (PR #72246)

2023-11-17 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/72246 From 84f320a1c746eddea3171bd984613464a5872cbb Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 14 Nov 2023 13:08:52 +0100 Subject: [PATCH] [include-cleaner] Make sure exports of stdlib also works for p

[clang-tools-extra] [include-cleaner] Make sure exports of stdlib also works for physical files (PR #72246)

2023-11-17 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/72246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-17 Thread kadir çetinkaya via cfe-commits
kadircet wrote: Thanks! I believe the idea is great, but I am not really sure if this is useful enough without handling anon namespaces properly. It's very rare that someone has a class/struct in a cc file, that isn't in an anon-namespace. Would you mind evolving the patch (and the infra) to w

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-17 Thread kadir çetinkaya via cfe-commits
kadircet wrote: Yes, the current logic that finds insertion point wont work in presence of anon namespaces. We normally do some pseudo parsing to find a location to insert the definiton, but because these are happening inside the main-file now, you can directly make use of sourcelocations ins

[clang-tools-extra] [clangd] Add includes from source to non-self-contained headers (PR #72479)

2023-11-20 Thread kadir çetinkaya via cfe-commits
kadircet wrote: hi! thanks for the interest @sr-tream but I am afraid this is likely to cause disruption in more cases than it might improve. apart from technical details like the threading concerns and reliance on certain variants that we don't really have (eg order of includes); at a high l

[clang-tools-extra] [clangd] Add includes from source to non-self-contained headers (PR #72479)

2023-11-20 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > We can limit ourselves to only the paired source file, and cancel inclusions > if the source file does not include a non-self-contained header directly. > This will reduce the number of situations in which this hack works, but will > avoid the problems you describe deducing

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/69704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet commented: thanks, LG in general just some small adjustments https://github.com/llvm/llvm-project/pull/69704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread kadir çetinkaya via cfe-commits
@@ -435,14 +407,17 @@ class DefineOutline : public Tweak { if (MD->getParent()->isTemplated()) return false; - // The refactoring is meaningless for unnamed classes and definitions - // within unnamed namespaces. + // The refactoring is meaningless

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread kadir çetinkaya via cfe-commits
@@ -435,14 +407,17 @@ class DefineOutline : public Tweak { if (MD->getParent()->isTemplated()) return false; - // The refactoring is meaningless for unnamed classes and definitions - // within unnamed namespaces. + // The refactoring is meaningless

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread kadir çetinkaya via cfe-commits
@@ -499,17 +473,64 @@ class DefineOutline : public Tweak { HeaderUpdates = HeaderUpdates.merge(*DelInline); } -auto HeaderFE = Effect::fileEdit(SM, SM.getMainFileID(), HeaderUpdates); -if (!HeaderFE) - return HeaderFE.takeError(); - -Effect->ApplyEdi

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread kadir çetinkaya via cfe-commits
@@ -499,17 +473,64 @@ class DefineOutline : public Tweak { HeaderUpdates = HeaderUpdates.merge(*DelInline); } -auto HeaderFE = Effect::fileEdit(SM, SM.getMainFileID(), HeaderUpdates); -if (!HeaderFE) - return HeaderFE.takeError(); - -Effect->ApplyEdi

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread kadir çetinkaya via cfe-commits
@@ -349,6 +349,44 @@ TEST_F(DefineOutlineTest, ApplyTest) { } } +TEST_F(DefineOutlineTest, InCppFile) { + FileName = "Test.cpp"; + + struct { +llvm::StringRef Test; +llvm::StringRef ExpectedSource; + } Cases[] = { + // Member function with some adornments +

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread kadir çetinkaya via cfe-commits
@@ -19,7 +19,7 @@ TWEAK_TEST(DefineOutline); TEST_F(DefineOutlineTest, TriggersOnFunctionDecl) { FileName = "Test.cpp"; - // Not available unless in a header file. + // Not available for free function unless in a header file. kadircet wrote: can you add s

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread kadir çetinkaya via cfe-commits
@@ -349,6 +349,44 @@ TEST_F(DefineOutlineTest, ApplyTest) { } } +TEST_F(DefineOutlineTest, InCppFile) { + FileName = "Test.cpp"; + + struct { +llvm::StringRef Test; +llvm::StringRef ExpectedSource; + } Cases[] = { + // Member function with some adornments +

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread kadir çetinkaya via cfe-commits
@@ -349,6 +358,36 @@ TEST_F(DefineOutlineTest, ApplyTest) { } } +TEST_F(DefineOutlineTest, InCppFile) { + FileName = "Test.cpp"; + + struct { +llvm::StringRef Test; +llvm::StringRef ExpectedSource; + } Cases[] = { + { + R"cpp( +namespace

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread kadir çetinkaya via cfe-commits
@@ -499,17 +473,64 @@ class DefineOutline : public Tweak { HeaderUpdates = HeaderUpdates.merge(*DelInline); } -auto HeaderFE = Effect::fileEdit(SM, SM.getMainFileID(), HeaderUpdates); -if (!HeaderFE) - return HeaderFE.takeError(); - -Effect->ApplyEdi

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread kadir çetinkaya via cfe-commits
@@ -19,7 +19,7 @@ TWEAK_TEST(DefineOutline); TEST_F(DefineOutlineTest, TriggersOnFunctionDecl) { FileName = "Test.cpp"; - // Not available unless in a header file. + // Not available for free function unless in a header file. kadircet wrote: well, availab

[clang] Reland "[clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes" (PR #69676)

2023-11-02 Thread kadir çetinkaya via cfe-commits
kadircet wrote: thanks for the revert! I also encountered certain crashes bisecting back to this patch, with a similar reproducer: ``` template struct Module { template struct Baz { template explicit Baz(X); }; Baz(int) -> Baz; }; struct Bar {}; void foo() { Module::Baz x{2}

[clang-tools-extra] [clangd] Track IWYU pragmas for non-preamble includes (PR #75612)

2023-12-15 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/75612 This makes PragmaIncldues copyable, and copies it from preamble when building a new AST. Fixes https://github.com/clangd/clangd/issues/1843 Fixes https://github.com/clangd/clangd/issues/1571 From 8801af07ad4e4

[clang-tools-extra] [clangd] Track IWYU pragmas for non-preamble includes (PR #75612)

2023-12-18 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/75612 From 8801af07ad4e469f832570b5027e1522f41a6d06 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Fri, 15 Dec 2023 15:14:05 +0100 Subject: [PATCH 1/2] [clangd] Track IWYU pragmas for non-preamble includes ---

[clang-tools-extra] [clangd] Track IWYU pragmas for non-preamble includes (PR #75612)

2023-12-18 Thread kadir çetinkaya via cfe-commits
@@ -113,7 +113,7 @@ class PragmaIncludes { llvm::DenseSet ShouldKeep; /// Owns the strings. - llvm::BumpPtrAllocator Arena; + std::shared_ptr Arena; kadircet wrote: you're right in theory, but in practice we actually never build ASTs concurrently from

[clang-tools-extra] [clangd] Perform self-containedness check at EOF (PR #75965)

2023-12-19 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/75965 Header gurads are not detected until we hit EOF. Make sure we postpone any such detection until then. From 32cfb9f9c196e665009051f83489ab09c36dd87a Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 19

[clang-tools-extra] [clangd][RFC] Add container field to remote index Refs grpc method (PR #71605)

2023-12-04 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks a lot (and sorry for missing this, so far) https://github.com/llvm/llvm-project/pull/71605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang-tools-extra] [clangd][RFC] Add container field to remote index Refs grpc method (PR #71605)

2023-12-04 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/71605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd][RFC] Add container field to remote index Refs grpc method (PR #71605)

2023-12-04 Thread kadir çetinkaya via cfe-commits
@@ -189,6 +189,10 @@ llvm::Expected Marshaller::fromProtobuf(const Ref &Message) { return Location.takeError(); Result.Location = *Location; Result.Kind = static_cast(Message.kind()); + auto ContainerID = SymbolID::fromStr(Message.container()); + if (!ContainerID) +

[clang-tools-extra] [clangd][RFC] Add container field to remote index Refs grpc method (PR #71605)

2023-12-04 Thread kadir çetinkaya via cfe-commits
@@ -223,6 +223,7 @@ TEST(RemoteMarshallingTest, RefSerialization) { Location.FileURI = testPathURI( "llvm-project/llvm/clang-tools-extra/clangd/Protocol.h", Strings); Ref.Location = Location; + Ref.Container = llvm::cantFail(SymbolID::fromStr("0001")); --

[clang-tools-extra] [clangd] check for synthesized symbols when tracking include locations (PR #75128)

2024-01-01 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks and sorry for leaving this out there, I was busy with other things and then OOO. https://github.com/llvm/llvm-project/pull/75128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang-tools-extra] [clangd] check for synthesized symbols when tracking include locations (PR #75128)

2024-01-01 Thread kadir çetinkaya via cfe-commits
@@ -821,7 +821,8 @@ void SymbolCollector::setIncludeLocation(const Symbol &S, SourceLocation DefLoc, // Use the expansion location to get the #include header since this is // where the symbol is exposed. - IncludeFiles[S.ID] = SM.getDecomposedExpansionLoc(DefLoc).first;

[clang-tools-extra] [clangd] check for synthesized symbols when tracking include locations (PR #75128)

2024-01-01 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/75128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd][RFC] Add container field to remote index Refs grpc method (PR #71605)

2024-01-02 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks! https://github.com/llvm/llvm-project/pull/71605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] don't lower severity of clang-tidy modernize-* checks to remarks (PR #75706)

2024-01-02 Thread kadir çetinkaya via cfe-commits
kadircet wrote: hi @5chmidti and @HighCommander4! it was deliberate to cover `modernize-` checks as they're pretty similar to `-wdeprecated` in nature, and they're both explicit, user needs to annotate code or opt-in for particular clang-tidy checks. feedback we received in the past was, thes

[clang] [clang-format] Fix more bugs in isStartOfName() (PR #72336)

2024-01-02 Thread kadir çetinkaya via cfe-commits
kadircet wrote: hi @owenca looks like this is still regressing certain patterns, e.g: ```cpp int foo BAR; ``` annotations before your modifications to `isStartOfName`: ``` AnnotatedTokens(L=0): M=0 C=0 T=Unknown S=1 F=0 B=0 BK=0 P=0 Name=int L=3 PPK=2 FakeLParens= FakeRParens=0 II=0x216ebe0 T

[clang] [clang-format] unexpected break after binOp '<<' (PR #69859)

2024-01-02 Thread kadir çetinkaya via cfe-commits
kadircet wrote: @s1Sharp are there any conclusions here? our code also incidentally relied on having new lines between string literals, mostly for the sake of having a line break after string literals that end with `\n`. what do people think about restoring the functionality to break after str

[clang] [clang-format] Break after string literals with trailing line breaks (PR #76795)

2024-01-03 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/76795 This restores a subset of functionality that was forego in d68826dfbd987377ef6771d40c1d984f09ee3b9e. Streaming multiple string literals is rare enough in practice, hence that change makes sense in general. But i

[clang] [clang-format] unexpected break after binOp '<<' (PR #69859)

2024-01-03 Thread kadir çetinkaya via cfe-commits
kadircet wrote: sent out https://github.com/llvm/llvm-project/pull/76795 for implementation https://github.com/llvm/llvm-project/pull/69859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [Format] Fix isStartOfName to recognize attributes (PR #76804)

2024-01-03 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. can you also add a test to clang/unittests/Format/TokenAnnotatorTest.cpp that ensures trailing attribute-like macros receive `StartOfName` annotation to make sure we don't regress the signal in the future? https://github.com/llvm/llvm-pro

[clang] [Tooling] Print the progress when there are multiple files to process (PR #75904)

2024-01-03 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, lgtm! https://github.com/llvm/llvm-project/pull/75904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Track IWYU pragmas for non-preamble includes (PR #75612)

2024-01-03 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/75612 From 041a3396cd62773bac985a6ca0b453b2f14635b3 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Fri, 15 Dec 2023 15:14:05 +0100 Subject: [PATCH 1/2] [clangd] Track IWYU pragmas for non-preamble includes ---

[clang-tools-extra] [clangd] Track IWYU pragmas for non-preamble includes (PR #75612)

2024-01-03 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/75612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Dont require confirmation for include-cleaner batch-fixes (PR #76826)

2024-01-03 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/76826 False negative/positive rate has decreased to the degree that these extra confirmations no longer provide any value, but only create friction in the happy case. When we have false analysis, people usually need t

[clang] [Tooling] Fix FixedCompilationDatabase with header compile flags (PR #73913)

2024-01-03 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks! https://github.com/llvm/llvm-project/pull/73913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Break after string literals with trailing line breaks (PR #76795)

2024-01-03 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/76795 From 18ef1d8901835f5129f775d292425b808f42fe85 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Wed, 3 Jan 2024 09:28:35 +0100 Subject: [PATCH 1/2] [clang-format] Break after string literals with trailing li

[clang] [clang-format] Break after string literals with trailing line breaks (PR #76795)

2024-01-03 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > Can you also add a formatting test? done https://github.com/llvm/llvm-project/pull/76795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-04 Thread kadir çetinkaya via cfe-commits
@@ -504,68 +502,6 @@ TEST_F(ExtractVariableTest, Test) { int main() { auto placeholder = []() { return 42; }(); return placeholder ; })cpp"}, - {R"cpp( -template -void foo(Ts ...args) { - auto x = [[ [&args...]() {} ]];

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-04 Thread kadir çetinkaya via cfe-commits
@@ -422,8 +422,6 @@ TEST_F(ExtractVariableTest, Test) { int member = 42; }; )cpp"}, - {R"cpp(void f() { auto x = [[ [](){ return 42; }]]; })cpp", kadircet wrote: let's change this to `auto x = +[[ ... ]]`, to make sure

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-04 Thread kadir çetinkaya via cfe-commits
@@ -490,6 +491,13 @@ bool eligibleForExtraction(const SelectionTree::Node *N) { BO->getRHS() == OuterImplicit.ASTNode.get()) return false; } + if (const auto *Decl = Parent->ASTNode.get()) { +if (!Decl->isInitCapture() && kadircet wrote: i

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-04 Thread kadir çetinkaya via cfe-commits
@@ -27,10 +27,10 @@ TEST_F(ExtractVariableTest, Test) { return t.b[[a]]r]]([[t.z]])]]; } void f() { - int a = [[5 +]] [[4 * xyz]](); + int a = 5 + [[4 * xyz]](); // multivariable initialization if(1) -int x = [[1

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-04 Thread kadir çetinkaya via cfe-commits
@@ -504,68 +502,6 @@ TEST_F(ExtractVariableTest, Test) { int main() { auto placeholder = []() { return 42; }(); return placeholder ; })cpp"}, - {R"cpp( kadircet wrote: again you can keep this test around by prepending a `+` to t

[clang-tools-extra] [clangd] Dont require confirmation for include-cleaner batch-fixes (PR #76826)

2024-01-04 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/76826 From 5e9a851584dcfd730fda7d85b54101ebea89f8a3 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Wed, 3 Jan 2024 16:06:13 +0100 Subject: [PATCH 1/2] [clangd] Dont require confirmation for include-cleaner batc

[clang-tools-extra] [clangd] Dont require confirmation for include-cleaner batch-fixes (PR #76826)

2024-01-04 Thread kadir çetinkaya via cfe-commits
@@ -237,18 +236,6 @@ removeAllUnusedIncludes(llvm::ArrayRef UnusedIncludes) { Diag.Fixes.front().Edits.begin(), Diag.Fixes.front().Edits.end()); } - - // TODO(hokein): emit a suitable text for the label. - ChangeAnnotat

[clang-tools-extra] [clangd] Dont require confirmation for include-cleaner batch-fixes (PR #76826)

2024-01-04 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > This change makes sense for removing all unused includes (as all these unused > includes are visible in the editor). For missing includes, they are less > obvious, but it is probably fine. The rationale for missing includes was the same, when things go wrong it's usually obs

[clang-tools-extra] [clangd] Dont require confirmation for include-cleaner batch-fixes (PR #76826)

2024-01-04 Thread kadir çetinkaya via cfe-commits
kadircet wrote: oh sorry, this should ofc work with include-cleaner fixes, as we actually provide these as edits, instead of commands, as we do with our usual tweaks. https://github.com/llvm/llvm-project/pull/76826 ___ cfe-commits mailing list cfe-com

[clang-tools-extra] [clangd] Dont require confirmation for include-cleaner batch-fixes (PR #76826)

2024-01-04 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/76826 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Break after string literals with trailing line breaks (PR #76795)

2024-01-04 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/76795 From 18ef1d8901835f5129f775d292425b808f42fe85 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Wed, 3 Jan 2024 09:28:35 +0100 Subject: [PATCH 1/3] [clang-format] Break after string literals with trailing li

[clang] [clang-format] Break after string literals with trailing line breaks (PR #76795)

2024-01-04 Thread kadir çetinkaya via cfe-commits
kadircet wrote: ping @HazardyKnusperkeks @owenca this is blocking releases on our side, anything concerning here? https://github.com/llvm/llvm-project/pull/76795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang-tools-extra] [include-cleaner] Fix a race issue when editing multiple files. (PR #76960)

2024-01-05 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/76960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] Fix a race issue when editing multiple files. (PR #76960)

2024-01-05 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, lgtm! https://github.com/llvm/llvm-project/pull/76960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] Fix a race issue when editing multiple files. (PR #76960)

2024-01-05 Thread kadir çetinkaya via cfe-commits
@@ -215,11 +208,15 @@ class ActionFactory : public tooling::FrontendActionFactory { : HeaderFilter(HeaderFilter) {} std::unique_ptr create() override { -return std::make_unique(HeaderFilter); +return std::make_unique(HeaderFilter, EditFiles); } + const l

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-05 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/76466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-05 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet commented: thanks, this LG in direction. only reviewed the pieces leading to in-file rename so far. https://github.com/llvm/llvm-project/pull/76466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-05 Thread kadir çetinkaya via cfe-commits
@@ -1187,6 +1187,16 @@ bool fromJSON(const llvm::json::Value &Params, RenameParams &R, O.map("position", R.position) && O.map("newName", R.newName); } +llvm::json::Value toJSON(const PrepareRenameResult &PRR) { + if (!PRR.placeholder) { kadircet wro

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-05 Thread kadir çetinkaya via cfe-commits
@@ -1436,6 +1436,14 @@ struct RenameParams { }; bool fromJSON(const llvm::json::Value &, RenameParams &, llvm::json::Path); +struct PrepareRenameResult { + /// Range of the string to rename. + Range range; + /// Placeholder text to use in the editor, if set. + std::optiona

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-05 Thread kadir çetinkaya via cfe-commits
@@ -53,13 +55,38 @@ struct RenameInputs { struct RenameResult { // The range of the symbol that the user can attempt to rename. Range Target; + // Placeholder text for the rename operation, if set. + std::optional Placeholder; // Rename occurrences for the current main

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-05 Thread kadir çetinkaya via cfe-commits
@@ -183,6 +185,8 @@ bool isSpelled(SourceLocation Loc, const NamedDecl &ND) { if (clang::Lexer::getRawToken(Loc, Tok, SM, LO)) return false; auto StrName = Name.getAsString(); + if (const auto *MD = dyn_cast(&ND)) +StrName = MD->getSelector().getNameForSlot(0).str(

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-05 Thread kadir çetinkaya via cfe-commits
@@ -569,8 +571,43 @@ renameWithinFile(ParsedAST &AST, const NamedDecl &RenameDecl, // } if (!isInsideMainFile(RenameLoc, SM)) continue; +Locs.push_back(RenameLoc); + } + if (const auto *MD = dyn_cast(&RenameDecl)) { kadircet wrote: let's

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-05 Thread kadir çetinkaya via cfe-commits
@@ -134,7 +134,7 @@ class ClangdLSPServer : private ClangdServer::Callbacks, void onWorkspaceSymbol(const WorkspaceSymbolParams &, Callback>); void onPrepareRename(const TextDocumentPositionParams &, - Callback>); +

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-05 Thread kadir çetinkaya via cfe-commits
@@ -508,7 +508,8 @@ static bool mayBeValidIdentifier(llvm::StringRef Ident) { !isAsciiIdentifierStart(Ident.front(), AllowDollar)) return false; for (char C : Ident) { -if (llvm::isASCII(C) && !isAsciiIdentifierContinue(C, AllowDollar)) +if (llvm::isASCII(C)

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-05 Thread kadir çetinkaya via cfe-commits
@@ -338,6 +338,10 @@ inline bool isReservedName(llvm::StringRef Name) { SourceLocation translatePreamblePatchLocation(SourceLocation Loc, const SourceManager &SM); +clangd::Range tokenRangeForLoc(SourceLocation TokLoc,

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-05 Thread kadir çetinkaya via cfe-commits
@@ -53,13 +55,38 @@ struct RenameInputs { struct RenameResult { // The range of the symbol that the user can attempt to rename. Range Target; + // Placeholder text for the rename operation, if set. + std::optional Placeholder; kadircet wrote: same here,

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-05 Thread kadir çetinkaya via cfe-commits
@@ -71,8 +98,8 @@ llvm::Expected rename(const RenameInputs &RInputs); /// REQUIRED: Occurrences is sorted and doesn't have duplicated ranges. llvm::Expected buildRenameEdit(llvm::StringRef AbsFilePath, llvm::StringRef InitialCode, -

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-05 Thread kadir çetinkaya via cfe-commits
@@ -569,8 +571,43 @@ renameWithinFile(ParsedAST &AST, const NamedDecl &RenameDecl, // } if (!isInsideMainFile(RenameLoc, SM)) continue; +Locs.push_back(RenameLoc); + } + if (const auto *MD = dyn_cast(&RenameDecl)) { +auto Code = SM.getBufferData(SM.ge

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-05 Thread kadir çetinkaya via cfe-commits
@@ -893,22 +964,36 @@ llvm::Expected buildRenameEdit(llvm::StringRef AbsFilePath, return LastOffset; }; - std::vector> OccurrencesOffsets; - for (const auto &R : Occurrences) { -auto StartOffset = Offset(R.start); -if (!StartOffset) - return StartOffset.t

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-05 Thread kadir çetinkaya via cfe-commits
@@ -53,13 +55,38 @@ struct RenameInputs { struct RenameResult { // The range of the symbol that the user can attempt to rename. Range Target; + // Placeholder text for the rename operation, if set. + std::optional Placeholder; // Rename occurrences for the current main

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-05 Thread kadir çetinkaya via cfe-commits
@@ -569,8 +571,43 @@ renameWithinFile(ParsedAST &AST, const NamedDecl &RenameDecl, // } if (!isInsideMainFile(RenameLoc, SM)) continue; +Locs.push_back(RenameLoc); + } + if (const auto *MD = dyn_cast(&RenameDecl)) { +auto Code = SM.getBufferData(SM.ge

  1   2   3   4   5   6   7   8   9   >