[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -710,6 +710,7 @@ class ASTWorker { TUScheduler::ASTCache &IdleASTs; TUScheduler::HeaderIncluderCache &HeaderIncluders; const bool RunSync; + kadircet wrote: can you get rid of these new line changes as well? https://github.com/llvm/llvm-project/pull/

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
kadircet wrote: again can you revert these changes? https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -112,6 +114,9 @@ class ClangdServer { /// This throttler controls which preambles may be built at a given time. clangd::PreambleThrottler *PreambleThrottler = nullptr; +/// Enable experimental support for modules. kadircet wrote: this isn't use

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -27,6 +27,9 @@ #include "Diagnostics.h" #include "FS.h" #include "Headers.h" + kadircet wrote: can you drop the extra new lines? https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-co

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
kadircet wrote: again can you revert these changes? https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
kadircet wrote: again can you revert these changes? https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,26 @@ +//=== ScanningProjectModules.h ---*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
kadircet wrote: can you rename this to `ScanningProjectModules.cpp` ? https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,347 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,347 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,199 @@ +//===-- ProjectModules.h -*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks, mostly LG. my biggest concern is around testing setup, PTAL. https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
kadircet wrote: again can you revert these changes? https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,347 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,347 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -146,6 +146,8 @@ class Checker { ClangdLSPServer::Options Opts; // from buildCommand tooling::CompileCommand Cmd; + std::unique_ptr BaseCDB; + std::unique_ptr CDB; kadircet wrote: can you also construct a `ModulesBuilder` here and populate `Inputs`

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,347 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang-tools-extra] [include-cleaner] Pass WorkingDir to suggestPathToFileForDiagnostics (PR #95114)

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

[clang] [clang][HeaderSearch] Fix handling of relative file-paths in suggestPathToFileForDiagnostics (PR #95121)

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

[clang-tools-extra] [clang][include-cleaner]skip stdlib recogntion only when there are defintion with body in main file. (PR #95797)

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

[clang-tools-extra] [clang][include-cleaner]skip stdlib recogntion only when there are defintion with body in main file. (PR #95797)

2024-06-18 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. hi @HerrCai0907 ! Left some detailed comments in the patch. Due to timezone differences, I highly suspect this will be fixed quickly and we have some extra delays for getting changes into releases (and I am going to be OOO nex

[clang-tools-extra] [clang][include-cleaner]skip stdlib recogntion only when there are defintion with body in main file. (PR #95797)

2024-06-18 Thread kadir çetinkaya via cfe-commits
@@ -39,20 +40,24 @@ Hints declHints(const Decl *D) { } std::vector> locateDecl(const Decl &D) { - std::vector> Result; - // FIXME: Should we also provide physical locations? - if (auto SS = tooling::stdlib::Recognizer()(&D)) { -Result.push_back({*SS, Hints::CompleteSymb

[clang-tools-extra] [clang][include-cleaner]skip stdlib recogntion only when there are defintion with body in main file. (PR #95797)

2024-06-19 Thread kadir çetinkaya via cfe-commits
@@ -39,20 +40,24 @@ Hints declHints(const Decl *D) { } std::vector> locateDecl(const Decl &D) { - std::vector> Result; - // FIXME: Should we also provide physical locations? - if (auto SS = tooling::stdlib::Recognizer()(&D)) { -Result.push_back({*SS, Hints::CompleteSymb

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-28 Thread kadir çetinkaya via cfe-commits
@@ -42,7 +41,11 @@ #include #include -namespace clang::clangd { +namespace clang { + +class Module; kadircet wrote: yes that's mostly something we try in clangd, but fair point, feel free to ignore this one. i was mostly pushing because this is just a lea

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

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

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -42,6 +42,8 @@ namespace clang { namespace clangd { + +class ModulesBuilder; kadircet wrote: we prefer to avoid forward declarations in clangd, can you rather depend on the header directly? https://github.com/llvm/llvm-project/pull/66462

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -149,9 +154,13 @@ struct PreambleBuildStats { /// If \p PreambleCallback is set, it will be run on top of the AST while /// building the preamble. /// If Stats is not non-null, build statistics will be exported there. +/// If \p RequiredModuleBuilder is not null, it will sca

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -222,6 +222,9 @@ class TUScheduler { /// Cache (large) preamble data in RAM rather than temporary files on disk. bool StorePreamblesInMemory = false; +/// Enable experimental support for modules. +bool ExperimentalModulesSupport = false; kad

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -208,15 +208,16 @@ ClangdServer::Options::operator TUScheduler::Options() const { Opts.UpdateDebounce = UpdateDebounce; Opts.ContextProvider = ContextProvider; Opts.PreambleThrottler = PreambleThrottler; + Opts.ExperimentalModulesSupport = ExperimentalModulesSupport;

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,115 @@ +//===- ModulesBuilder.h --*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -44,6 +44,8 @@ struct ParseOptions { bool ImportInsertions = false; }; +class ModulesBuilder; kadircet wrote: again instead of forward decl, can you include the header? https://github.com/llvm/llvm-project/pull/66462

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
kadircet wrote: again no need for any of these changes, we should just pass `Inputs` as-is to `buildPreamble`. https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,206 @@ +//===-- ProjectModules.h -*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -25,6 +25,8 @@ namespace clang { namespace clangd { +class ProjectModules; kadircet wrote: as others have also pointed out, this forward declaration is working around a cyclic dependency. can we restructure this a little by: - moving definition of Project

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,370 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,115 @@ +//===- ModulesBuilder.h --*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,370 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -192,8 +192,10 @@ TEST(PreamblePatchTest, PatchesPreambleIncludes) { TU.AdditionalFiles["b.h"] = ""; TU.AdditionalFiles["c.h"] = ""; auto PI = TU.inputs(FS); - auto BaselinePreamble = buildPreamble( - TU.Filename, *buildCompilerInvocation(PI, Diags), PI, true, nu

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-05-31 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,370 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-15 Thread kadir çetinkaya via cfe-commits
@@ -451,6 +451,7 @@ ParsedAST::build(llvm::StringRef Filename, const ParseInputs &Inputs, DiagnosticConsumer *DiagConsumer = &ASTDiags; IgnoreDiagnostics DropDiags; if (Preamble) { +CI->TargetOpts = Preamble->TargetOpts; Patch = PreamblePatch::createFullPatch(Fi

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-15 Thread kadir çetinkaya via cfe-commits
@@ -768,6 +764,35 @@ TEST(ParsedASTTest, GracefulFailureOnAssemblyFile) { << "Should not try to build AST for assembly source file"; } +TEST(ParsedASTTest, PreambleWithDifferentTarget) { + constexpr std::string_view kPreambleTarget = "x86_64"; kadircet

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-15 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > Just to confirm I understand the broader context: we only need it when > building the AST because the rest of the code (completions, signature help) > actually already uses a compile command and FS from preamble inputs, right? That was my remembrance, but apparently it was wr

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-15 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/88381 From 233f413b5921ff23c171fa5ada5623ad1a8e3d82 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 4 Apr 2024 10:57:44 +0200 Subject: [PATCH 1/2] [clangd] Propagate context into stdlib indexing thread Some

[clang-tools-extra] [clangd] Propagate context into stdlib indexing thread (PR #87611)

2024-04-16 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/87611 From cd8993935f5c5ff8a46d2741ef8c76348ab8e868 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 4 Apr 2024 10:57:44 +0200 Subject: [PATCH] [clangd] Propagate context into stdlib indexing thread Some FS

[clang-tools-extra] [clangd] Propagate context into stdlib indexing thread (PR #87611)

2024-04-16 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/87611 From a5cc9640c05ad06bff6ec28c958669df4b7e8214 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 4 Apr 2024 10:57:44 +0200 Subject: [PATCH] [clangd] Propagate context into stdlib indexing thread Some FS

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-18 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/88381 From d747d817b6df04c8b93b7f89379448e467f0a0cd Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 11 Apr 2024 14:02:43 +0200 Subject: [PATCH] [clangd] Use TargetOpts from preamble when building ASTs Build

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-18 Thread kadir çetinkaya via cfe-commits
@@ -112,7 +112,10 @@ struct UpdateIndexCallbacks : public ParsingCallbacks { // Index outlives TUScheduler (declared first) FIndex(FIndex), // shared_ptr extends lifetime - Stdlib(Stdlib)]() mutable { +

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-18 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/88381 From a99cb340ec6ede680a2b4d278b48d6062c42bef5 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 11 Apr 2024 14:02:43 +0200 Subject: [PATCH] [clangd] Use TargetOpts from preamble when building ASTs Build

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

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

[clang-tools-extra] [clangd] Propagate context into stdlib indexing thread (PR #87611)

2024-04-18 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/87611 From 2b8899a6fd9477dd411f2a89409703a6e16aef2b Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 4 Apr 2024 10:57:44 +0200 Subject: [PATCH] [clangd] Propagate context into stdlib indexing thread Some FS

[clang-tools-extra] [clangd] Propagate context into stdlib indexing thread (PR #87611)

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

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-19 Thread kadir çetinkaya via cfe-commits
kadircet wrote: Hi @zibi2, sorry for missing the breakage in the buildbot. ce2f6423f016 should fix it. https://github.com/llvm/llvm-project/pull/88381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang-tools-extra] [clangd] Show struct fields and enum members in hovers (PR #89557)

2024-04-22 Thread kadir çetinkaya via cfe-commits
kadircet wrote: So my 2cents; > 1. I know a [previous comment on the > bug](https://github.com/clangd/clangd/issues/959#issuecomment-998927030) > stated "We don't show bodies of classes/enums/functions etc by policy", but > can we consider changing this policy in the more limited case of pub

[clang] [clang][CUDA] Assume unknown emission status for skipped function definitions (PR #100124)

2024-07-23 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/100124 Emission status seems to be only used by cuda/openmp/hip compiles, to figure out when to emit diagnostics. Current logic emits "uknown" when definition is missing, so i extended that to skipped-function-bodies a

[clang] [clang][CUDA] Assume unknown emission status for skipped function definitions (PR #100124)

2024-07-23 Thread kadir çetinkaya via cfe-commits
kadircet wrote: this is fixing crashes when using clangd on cuda files. as clangd skips function bodies inside headers to speed up parsing times. https://github.com/llvm/llvm-project/pull/100124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Driver] Add flag for setting SkipFunctionBodies (PR #100135)

2024-07-23 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/100135 This is an option set by certain tools (clangd and ASTUnit). Sometimes there are crashes in clang unique to this configuration and it's really hard to provide reproducers without invoking the tool. From 5c7564

[clang] [clang][Driver] Add flag for setting SkipFunctionBodies (PR #100135)

2024-07-24 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/100135 From 884a272b83271ae869cbc4b523424f909e77bdba Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 23 Jul 2024 16:46:21 +0200 Subject: [PATCH] [clang][Driver] Add cc1 flag for setting SkipFunctionBodies T

[clang] [clang][Driver] Add flag for setting SkipFunctionBodies (PR #100135)

2024-07-24 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > That said, so long as this is a -cc1-only option, it seems reasonable to m this is a cc1-only option. added test, updated the commit message. https://github.com/llvm/llvm-project/pull/100135 ___ cfe-commits mailing list cfe-commits@l

[clang] [clang][CUDA] Assume unknown emission status for skipped function definitions (PR #100124)

2024-07-24 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/100124 From 40e518d66df536253be9d36a1d91c10ecbaf2bff Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 23 Jul 2024 15:43:30 +0200 Subject: [PATCH] [clang][CUDA] Assume unknown emission status for skipped func

[clang] [clang][CUDA] Assume unknown emission status for skipped function definitions (PR #100124)

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

[clang] [clang][Driver] Add flag for setting SkipFunctionBodies (PR #100135)

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

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-16 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,355 @@ +//===--- PrerequisiteModulesTests.cpp ---*- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifi

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-16 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,355 @@ +//===--- PrerequisiteModulesTests.cpp ---*- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifi

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

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

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-16 Thread kadir çetinkaya via cfe-commits
@@ -318,6 +309,10 @@ bool StandalonePrerequisiteModules::canReuse( Clang.getHeaderSearchOpts().ForceCheckCXX20ModulesInputFiles = true; Clang.getHeaderSearchOpts().ValidateASTInputFilesContent = true; + // Following the practice of clang's driver to suppres the checking f

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-16 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,411 @@ +//===--- PrerequisiteModulesTests.cpp ---*- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifi

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-16 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,335 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-16 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,335 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-16 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,335 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-16 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,335 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-16 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks a lot, LGTM! i think the only big item remaining is injecting resource-dir correctly when running clang-scan-deps. the most important follow up (for functionality, rather than optimizations and usability) is indexing the PCMs as w

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-16 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,199 @@ +//===-- ProjectModules.h -*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-16 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,335 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-16 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,335 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [IncludeCleaner] Also check for spellings of physical headers (PR #99843)

2024-07-22 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/99843 Some physical headers can have "conflicting" spellings, when same filename exists under two different include search paths. e.g. can be provided by both standard library and underlying libc headers. In such scen

[clang-tools-extra] [IncludeCleaner] Also check for spellings of physical headers (PR #99843)

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

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/106241 CompilerInstance can re-use same SourceManager across multiple frontendactions. During this process it calls `SourceManager::clearIDTables` to reset any caches based on FileIDs. It didn't reset IncludeLocMap, r

[clang-tools-extra] [clangd] Update TidyFastChecks for release/19.x (PR #106354)

2024-08-28 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/106354 Run for clang-tidy checks available in release/19.x branch. Some notable findings: - altera-id-dependent-backward-branch, stays slow with 13%. - misc-const-correctness become faster, going from 261% to 67%, but

[clang-tools-extra] [clangd] Update TidyFastChecks for release/19.x (PR #106354)

2024-08-28 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/106354 From c2248b8f0b6255774c7cf2aa80e7330696fd9c40 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Wed, 28 Aug 2024 11:27:47 +0200 Subject: [PATCH] [clangd] Update TidyFastChecks for release/19.x Run for clang

[clang-tools-extra] [clangd] Do not collect macros when clang-tidy checks call into the preprocessor (PR #106329)

2024-08-28 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, lgtm! https://github.com/llvm/llvm-project/pull/106329 ___ 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 collect macros when clang-tidy checks call into the preprocessor (PR #106329)

2024-08-28 Thread kadir çetinkaya via cfe-commits
@@ -702,6 +704,10 @@ ParsedAST::build(llvm::StringRef Filename, const ParseInputs &Inputs, log("Execute() failed when building AST for {0}: {1}", MainInput.getFile(), toString(std::move(Err))); + // Disable the macro collector for the remainder of this function,

[clang-tools-extra] [clangd] Do not collect macros when clang-tidy checks call into the preprocessor (PR #106329)

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

[clang-tools-extra] [include-cleaner] Mark RecordDecls referenced in UsingDecls as explicit (PR #106430)

2024-08-28 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/106430 We were reporting ambigious references from using declarations as user can be depending on different overloads of a function just because they are visible in the TU. This doesn't apply to records, or primary tem

[clang] [clang-format] Correctly identifies token-pasted record names (PR #106484)

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

[clang] [clang-format] Don't merge a short block for SBS_Never (PR #88238)

2024-08-29 Thread kadir çetinkaya via cfe-commits
kadircet wrote: This seems to be recognizing some initliazer list statements as blocks as well, e.g: ```objc $ cat a.m [bar bat:{{0, 1, 2, 3}} qq: qq]; ``` this seems to be formatted as: ```objc $ ~/repos/llvm/build/bin/clang-format -style='{AllowShortBlocksOnASingleLine: Never}' a.m [bar bat

[clang-tools-extra] [include-cleaner] Mark RecordDecls referenced in UsingDecls as explicit (PR #106430)

2024-08-29 Thread kadir çetinkaya via cfe-commits
@@ -203,7 +203,7 @@ class ASTWalker : public RecursiveASTVisitor { bool VisitUsingDecl(UsingDecl *UD) { for (const auto *Shadow : UD->shadows()) { auto *TD = Shadow->getTargetDecl(); - auto IsUsed = TD->isUsed() || TD->isReferenced(); + auto IsUsed = TD->i

[clang-tools-extra] [include-cleaner] Mark RecordDecls referenced in UsingDecls as explicit (PR #106430)

2024-08-29 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/106430 From 9a96724fba63c91eefca804112c8e862e5427c10 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Wed, 28 Aug 2024 20:30:08 +0200 Subject: [PATCH] [include-cleaner] Mark RecordDecls referenced in UsingDecls a

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-29 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/106241 From f8fb04379255a783f1fbdcd07cfff5846d253d32 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 27 Aug 2024 17:56:47 +0200 Subject: [PATCH] [clang] Cleanup IncludeLocMap CompilerInstance can re-use sam

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-29 Thread kadir çetinkaya via cfe-commits
@@ -350,6 +350,7 @@ void SourceManager::clearIDTables() { LastLineNoContentCache = nullptr; LastFileIDLookup = FileID(); + IncludedLocMap.clear(); kadircet wrote: done https://github.com/llvm/llvm-project/pull/106241

[clang] [clang-tools-extra] [clang] Hide the `DiagnosticOptions` pointer from `CompilerInvocation` (PR #106274)

2024-08-29 Thread kadir çetinkaya via cfe-commits
kadircet wrote: yes turning diagnosticoptions to be a ThreadSafeRefCountedBase pointer should ensure we have similar guarantees. so LG from clangd side, but I am not sure about implications on using thread-aware structs in core parts of clang. so it might be worthwhile to get some opinions fro

[clang-tools-extra] [include-cleaner] Mark RecordDecls referenced in UsingDecls as explicit (PR #106430)

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

[clang] [clang-format] Correctly annotate braces in ObjC square brackets (PR #106654)

2024-08-30 Thread kadir çetinkaya via cfe-commits
@@ -3286,6 +3286,14 @@ TEST_F(TokenAnnotatorTest, BlockLBrace) { EXPECT_BRACE_KIND(Tokens[4], BK_Block); EXPECT_TOKEN(Tokens[5], tok::l_brace, TT_BlockLBrace); EXPECT_BRACE_KIND(Tokens[5], BK_Block); + + Tokens = annotate("[foo bar:{{0, 1}}];", getLLVMStyle(FormatStyle::

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-30 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/106241 From c8c29eae625991ee1ea7dfbfcda4a31f0b19b2e3 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 27 Aug 2024 17:56:47 +0200 Subject: [PATCH] [clang] Cleanup IncludeLocMap CompilerInstance can re-use sam

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

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

[clang-tools-extra] [include-cleaner] Report refs for enum constants used through namespace aliases (PR #106706)

2024-08-30 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/106706 None From 82ac332a3b94f6f753b706077b13f405ff776882 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Fri, 30 Aug 2024 12:28:02 +0200 Subject: [PATCH] [include-cleaner] Report refs for enum constants used th

[clang] [clang-format] Correctly annotate braces in ObjC square brackets (PR #106654)

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

[clang-tools-extra] [include-cleaner] Report refs for enum constants used through namespace aliases (PR #106706)

2024-08-30 Thread kadir çetinkaya via cfe-commits
@@ -534,6 +534,8 @@ TEST(WalkAST, Enums) { testWalk(R"(namespace ns { enum E { A = 42 }; } struct S { using ns::E::A; };)", "int e = S::^A;"); + testWalk(R"(namespace ns { enum E { $explicit^A = 42 }; })", + "namespace z = ns; int e = z::^A

[clang-tools-extra] [include-cleaner] Report refs for enum constants used through namespace aliases (PR #106706)

2024-08-30 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/106706 From 55be096324da41a17612fb67bfa521a8f42c7874 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Fri, 30 Aug 2024 12:28:02 +0200 Subject: [PATCH] [include-cleaner] Report refs for enum constants used through

[clang] [clang-tools-extra] [clang] Hide the `TargetOptions` pointer from `CompilerInvocation` (PR #106271)

2024-08-30 Thread kadir çetinkaya via cfe-commits
@@ -216,7 +216,7 @@ enum OpenCLTypeKind : uint8_t { /// class TargetInfo : public TransferrableTargetInfo, public RefCountedBase { - std::shared_ptr TargetOpts; + TargetOptions *TargetOpts; kadircet wrote: this is making me a little anxiou

<    1   2   3   4   5   6   7   8   9   >