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

2024-09-02 Thread kadir çetinkaya via cfe-commits
@@ -146,9 +148,24 @@ class ASTWalker : public RecursiveASTVisitor { // // If it's an enum constant, it must be due to prior decl. Report references // to it when qualifier isn't a type. -if (llvm::isa(FD)) { - if (!DRE->getQualifier() || DRE->getQualifier(

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

2024-09-02 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/106706 From 53b34977daa00abdad9bb6b3a351b05ae59cb2df 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-tools-extra] [include-cleaner] Report refs for enum constants used through namespace aliases (PR #106706)

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

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

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

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

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

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

2024-09-02 Thread kadir çetinkaya via cfe-commits
kadircet wrote: /cherry-pick b47d7ce8121b1cb1923e879d58eaa1d63aeaaae2 https://github.com/llvm/llvm-project/pull/106354 ___ 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-09-02 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] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-12 Thread kadir çetinkaya via cfe-commits
@@ -51,6 +52,9 @@ namespace clang { namespace clangd { + +extern llvm::cl::opt ExperimentalModulesSupport; kadircet wrote: we don't need this declaration for the command line flag, we're already passing this through `ClangdLSPServer::Options`. https://githu

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

2024-07-12 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-12 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-12 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,340 @@ +//===- 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-12 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-12 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,110 @@ +//===- 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-07-12 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-12 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-12 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: no i think tha

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

2024-07-12 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-12 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,340 @@ +//===- 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-12 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-12 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] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited 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] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. 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] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread kadir çetinkaya via cfe-commits
@@ -135,6 +135,21 @@ TEST(IncludeCleaner, GetUnusedHeaders) { Pointee(writtenInclusion("\"dir/unused.h\""; } +TEST(IncludeCleaner, SystemUnusedHeaders) { + auto TU = TestTU::withCode(R"cpp( +#include +#include +SystemClass x; + )c

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

2024-05-10 Thread kadir çetinkaya via cfe-commits
@@ -254,6 +254,10 @@ struct Fragment { /// unused or missing. These can match any suffix of the header file in /// question. std::vector> IgnoreHeader; + + /// If false (default), unused system headers will be ignored. + /// Standard library headers

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

2024-05-10 Thread kadir çetinkaya via cfe-commits
@@ -572,32 +572,43 @@ struct FragmentCompiler { #else static llvm::Regex::RegexFlags Flags = llvm::Regex::NoFlags; #endif -auto Filters = std::make_shared>(); -for (auto &HeaderPattern : F.IgnoreHeader) { - // Anchor on the right. - std::string AnchoredPat

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

2024-05-10 Thread kadir çetinkaya via cfe-commits
@@ -114,6 +114,7 @@ struct Config { /// these regexes. struct { std::vector> IgnoreHeader; + bool AnalyzeSystemHeaders = false; kadircet wrote: can you move the comment about regexes near `IgnoreHeader`. Also I think `AnalyzeAngledIncludes

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

2024-05-10 Thread kadir çetinkaya via cfe-commits
@@ -62,15 +64,6 @@ issueIncludeCleanerDiagnostics(ParsedAST &AST, llvm::StringRef Code, const ThreadsafeFS &TFS, HeaderFilter IgnoreHeader = {}); -/// Affects whether standard library includes should be considered

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

2024-05-10 Thread kadir çetinkaya via cfe-commits
@@ -572,32 +572,43 @@ struct FragmentCompiler { #else static llvm::Regex::RegexFlags Flags = llvm::Regex::NoFlags; #endif -auto Filters = std::make_shared>(); -for (auto &HeaderPattern : F.IgnoreHeader) { - // Anchor on the right. - std::string AnchoredPat

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

2024-05-10 Thread kadir çetinkaya via cfe-commits
@@ -135,6 +135,21 @@ TEST(IncludeCleaner, GetUnusedHeaders) { Pointee(writtenInclusion("\"dir/unused.h\""; } +TEST(IncludeCleaner, SystemUnusedHeaders) { + auto TU = TestTU::withCode(R"cpp( +#include +#include +SystemClass x; + )c

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

2024-05-10 Thread kadir çetinkaya via cfe-commits
kadircet wrote: thanks for the patch! this definitely LGTM at high level. as you folks also pointed out we don't want to surface analysis for angled includes in general, as include-cleaner doesn't have support for system headers yet (we wanted to have something similar to Stdlib includes, whic

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

2024-05-13 Thread kadir çetinkaya via cfe-commits
@@ -572,32 +572,43 @@ struct FragmentCompiler { #else static llvm::Regex::RegexFlags Flags = llvm::Regex::NoFlags; #endif -auto Filters = std::make_shared>(); -for (auto &HeaderPattern : F.IgnoreHeader) { - // Anchor on the right. - std::string AnchoredPat

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

2024-05-13 Thread kadir çetinkaya via cfe-commits
@@ -572,32 +572,43 @@ struct FragmentCompiler { #else static llvm::Regex::RegexFlags Flags = llvm::Regex::NoFlags; #endif -auto Filters = std::make_shared>(); -for (auto &HeaderPattern : F.IgnoreHeader) { - // Anchor on the right. - std::string AnchoredPat

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

2024-05-13 Thread kadir çetinkaya via cfe-commits
@@ -135,6 +135,21 @@ TEST(IncludeCleaner, GetUnusedHeaders) { Pointee(writtenInclusion("\"dir/unused.h\""; } +TEST(IncludeCleaner, SystemUnusedHeaders) { + auto TU = TestTU::withCode(R"cpp( +#include +#include +SystemClass x; + )c

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

2024-05-13 Thread kadir çetinkaya via cfe-commits
@@ -135,6 +135,21 @@ TEST(IncludeCleaner, GetUnusedHeaders) { Pointee(writtenInclusion("\"dir/unused.h\""; } +TEST(IncludeCleaner, SystemUnusedHeaders) { + auto TU = TestTU::withCode(R"cpp( +#include +#include +SystemClass x; + )c

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

2024-05-13 Thread kadir çetinkaya via cfe-commits
@@ -68,24 +68,32 @@ bool isIgnored(llvm::StringRef HeaderPath, HeaderFilter IgnoreHeaders) { } bool mayConsiderUnused(const Inclusion &Inc, ParsedAST &AST, - const include_cleaner::PragmaIncludes *PI) { + const include_cleaner::Prag

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

2024-05-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks a lot, LGTM! it'd be great if you can also follow up with a change to https://github.com/llvm/clangd-www/blob/main/config.md https://github.com/llvm/llvm-project/pull/87208 ___ cfe-commit

[clang] [clang-tools-extra] [clang][CodeComplete] Omit ExplicitObject when completing code (PR #92743)

2024-05-21 Thread kadir çetinkaya via cfe-commits
kadircet wrote: instead of testing this in clangd, can you add tests to `clang/test/CodeCompletion/`? (even better if you can extend `clang/unittests/Sema/CodeCompleteTest.cpp`). as this is a clang feature, and it'd be nice to make sure it doesn't regress at clang-level. https://github.com/ll

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-05-21 Thread kadir çetinkaya via cfe-commits
kadircet wrote: hi! this seems to be crashing for certain code patterns, https://github.com/llvm/llvm-project/issues/92896 has a minimal reproducer https://github.com/llvm/llvm-project/pull/90397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-05-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,106 @@ +//===-- ModuleDependencyScanner.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-22 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks a lot and sorry for taking so long. i think this looks great at a high level, mostly asked for some changes in the implementation. the only layering-wise change is who should own `ModulesBuilder` (you can find details i

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

2024-05-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,339 @@ +//===- 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-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,71 @@ +//===- 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: Apa

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

2024-05-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,106 @@ +//===-- ModuleDependencyScanner.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-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,106 @@ +//===-- ModuleDependencyScanner.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-22 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-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,106 @@ +//===-- ModuleDependencyScanner.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-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,71 @@ +//===- 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: Apa

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

2024-05-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,106 @@ +//===-- ModuleDependencyScanner.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-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,106 @@ +//===-- ModuleDependencyScanner.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-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,106 @@ +//===-- ModuleDependencyScanner.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-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,106 @@ +//===-- ModuleDependencyScanner.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-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,106 @@ +//===-- ModuleDependencyScanner.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-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,81 @@ +//=== ModuleDependencyScanner.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: Apa

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

2024-05-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,71 @@ +//===- 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: Apa

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

2024-05-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,81 @@ +//=== ModuleDependencyScanner.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: Apa

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

2024-05-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,339 @@ +//===- 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-22 Thread kadir çetinkaya via cfe-commits
@@ -48,6 +48,9 @@ Major New Features Improvements to clangd -- +- Introduced exmperimental support for C++20 Modules. The experimental support can + be enabled by `-experimental-modules-support` option. kadircet wrote: i think we should

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

2024-05-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,339 @@ +//===- 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-22 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,339 @@ +//===- 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][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-22 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/93079 Prevent OOB access. Fixes https://github.com/llvm/llvm-project/issues/93076 From 7840ea2b16863ee7057f3b1239c59b6be06cbd42 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Wed, 22 May 2024 19:37:18 +0200 S

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-23 Thread kadir çetinkaya via cfe-commits
@@ -11298,8 +11298,9 @@ static void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, Expr *FromExpr = Conv.Bad.FromExpr; QualType FromTy = Conv.Bad.getFromType(); QualType ToTy = Conv.Bad.getToType(); - SourceRange ToParamRange = - !isObjectArgument ? Fn->ge

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-24 Thread kadir çetinkaya via cfe-commits
@@ -11298,8 +11298,9 @@ static void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, Expr *FromExpr = Conv.Bad.FromExpr; QualType FromTy = Conv.Bad.getFromType(); QualType ToTy = Conv.Bad.getToType(); - SourceRange ToParamRange = - !isObjectArgument ? Fn->ge

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-24 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/93079 From f7bdd39714e21ff31b3c5aa6a3a18967cb6fef2c Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Wed, 22 May 2024 19:37:18 +0200 Subject: [PATCH 1/2] [clang][Sema] Fix crash when diagnosing candidates with pa

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-24 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/93079 From 6a057ff4b539045ce81e55b63702892496d18a97 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Wed, 22 May 2024 19:37:18 +0200 Subject: [PATCH] [clang][Sema] Fix crash when diagnosing candidates with parame

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-24 Thread kadir çetinkaya via cfe-commits
kadircet wrote: @shafik thx for the pointers, i didn't know this came up before and even there were attempted fixes. I can verify that both of those are also fixed with this patch. @knightXun do you plan to proceed with https://github.com/llvm/llvm-project/pull/70280 ? If so I am happy to dis

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-24 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/93079 From 9c691ab41ba500c1962bf9d63de86b65f184f047 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Wed, 22 May 2024 19:37:18 +0200 Subject: [PATCH] [clang][Sema] Fix crash when diagnosing candidates with parame

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/93079 From d133b1bf63ab8c5408497ef4c2d2d629ebcff8eb Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Wed, 22 May 2024 19:37:18 +0200 Subject: [PATCH] [clang][Sema] Fix crash when diagnosing candidates with parame

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/93079 From 98ae27a0d303252a23891b204df18112a846f661 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Wed, 22 May 2024 19:37:18 +0200 Subject: [PATCH] [clang][Sema] Fix crash when diagnosing candidates with parame

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

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

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

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

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

2024-05-27 Thread kadir çetinkaya via cfe-commits
@@ -42,7 +41,11 @@ #include #include -namespace clang::clangd { +namespace clang { + +class Module; kadircet wrote: this is not an "unnecessary" include, clangd requires a declaration of `clang::Module` in this file (even if incomplete) and we try not to h

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

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

Re: [PATCH] D114665: [clangd] Make a.k.a printing configurable.

2021-12-07 Thread Kadir Çetinkaya via cfe-commits
SG if you also considered the style block. I suppose the risks of having this in a feature-specific block is much lower. On Tue, Dec 7, 2021, 20:14 Sam McCall via Phabricator < revi...@reviews.llvm.org> wrote: > sammccall added inline comments. > > > > Comment at: clang-tools-ext

Re: [PATCH] D116085: [clang-tidy] Performance improvements for NOLINTBEGIN/END blocks

2021-12-21 Thread Kadir Çetinkaya via cfe-commits
Hi Salman, it looks like patch doesn't have edit access for anyone but you. I had drafted some comments but can't hit the submit button. I think you can go to https://reviews.llvm.org/differential/revision/edit/116085/ and change the `Editable By` field to `All Users` On Tue, Dec 21, 2021 at 8:45

[clang] [clang] Avoid triggering vtable instantiation for C++23 constexpr dtor (PR #102605)

2024-08-19 Thread kadir çetinkaya via cfe-commits
kadircet wrote: hi, this seems to be triggering infinite recursion and stack exhaustion on some invalid code patterns, see https://github.com/llvm/llvm-project/issues/104802 for details. https://github.com/llvm/llvm-project/pull/102605 ___ cfe-commit

[clang] [clang-forma] Support `PointerAlignment` for pointers to members (PR #86253)

2024-08-20 Thread kadir çetinkaya via cfe-commits
kadircet wrote: Hi folks, I am a little confused about the behavior introduced by this patch. I was expecting `Foo::*` in `Type Foo::* name` to be treated as a single entity and whole thing to be aligned with `name` or spaced away from it, Rather than splitting `*` . To add some more from the

[clang] [clang-format] Treat new expressions as simple functions (PR #105168)

2024-08-20 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/105168 ccae7b461be339e717d02f99ac857cf0bc7d17f improved handling for nested calls, but this resulted in a lot of changes near `new` expressions. This patch tries to restore previous behavior around new expressions, by

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

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

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-20 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks a lot for the quick fix! https://github.com/llvm/llvm-project/pull/105043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-20 Thread kadir çetinkaya via cfe-commits
@@ -4591,7 +4589,9 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, if (!BeforeLeft) return false; if (BeforeLeft->is(tok::coloncolon)) { - return Left.is(tok::star) && + const auto *Prev = BeforeLeft->Previous; + return Left

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-20 Thread kadir çetinkaya via cfe-commits
@@ -4591,7 +4589,9 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, if (!BeforeLeft) return false; if (BeforeLeft->is(tok::coloncolon)) { - return Left.is(tok::star) && + const auto *Prev = BeforeLeft->Previous; + return Left

[clang] [clang-format] Treat new expressions as simple functions (PR #105168)

2024-08-21 Thread kadir çetinkaya via cfe-commits
kadircet wrote: ``` $ cat a.cc fooo(BAR( XXXZ())); ``` ``` $ clang-format a.cc fooo(BAR( XXXZ())); ``` https://github.com/llvm/llvm-project/pul

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-21 Thread kadir çetinkaya via cfe-commits
@@ -4591,7 +4589,9 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, if (!BeforeLeft) return false; if (BeforeLeft->is(tok::coloncolon)) { - return Left.is(tok::star) && + const auto *Prev = BeforeLeft->Previous; + return Left

[clang] [clang-format] Treat new expressions as simple functions (PR #105168)

2024-08-22 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/105168 From d0f1e7032647845fbe235856998e86bfbb59e937 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 20 Aug 2024 19:40:42 +0200 Subject: [PATCH] [clang-format] Treat new expressions as simple functions ccae

[clang] [clang-format] Treat new expressions as simple functions (PR #105168)

2024-08-22 Thread kadir çetinkaya via cfe-commits
@@ -848,6 +848,8 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, const auto IsSimpleFunction = [&](const FormatToken &Tok) { if (!Tok.FakeLParens.empty() && Tok.FakeLParens.back() > prec::Unknown) return false; +if (Tok.is(tok

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

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

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-22 Thread kadir çetinkaya via cfe-commits
@@ -4589,9 +4589,12 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, if (!BeforeLeft) return false; if (BeforeLeft->is(tok::coloncolon)) { - const auto *Prev = BeforeLeft->Previous; - return Left.is(tok::star) && Prev && -

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

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

[clang] [clang-format] Treat new expressions as simple functions (PR #105168)

2024-08-23 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/105168 From 089699a673d29e244e750bf1c978292594362cdc Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 20 Aug 2024 19:40:42 +0200 Subject: [PATCH] [clang-format] Treat new expressions as simple functions ccae

[clang-tools-extra] [include-cleaner] Turn new/delete usages to ambiguous references (PR #105844)

2024-08-23 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/105844 In practice most of these expressions just resolve to implicitly provided `operator new` and standard says it's not necessary to include `` for that. Hence this is resulting in a lot of churn in cases where incl

[clang-tools-extra] [include-cleaner] Turn new/delete usages to ambiguous references (PR #105844)

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

[clang] [clang-format] Treat new expressions as simple functions (PR #105168)

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

[clang] [Format] Dont treat LBrace after extends/implements as initializer list (PR #108524)

2024-09-16 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/108524 From e63f2acd673183d15420b41ebe50a1c061de0905 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Fri, 13 Sep 2024 11:31:43 +0200 Subject: [PATCH] [Format] Dont treat LBrace after extends/implements as initia

[clang] [Format] Dont treat LBrace after extends/implements as initializer list (PR #108524)

2024-09-16 Thread kadir çetinkaya via cfe-commits
kadircet wrote: added, ptal https://github.com/llvm/llvm-project/pull/108524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating angles containing FatArrow (PR #108671)

2024-09-16 Thread kadir çetinkaya via cfe-commits
@@ -243,14 +244,16 @@ class AnnotatingParser { // operator that was misinterpreted because we are parsing template // parameters. // FIXME: This is getting out of hand, write a decent parser. - if (InExpr && !Line.startsWith(tok::kw_template) && + if

[clang] [clang-format] Fix a bug in annotating angles containing FatArrow (PR #108671)

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

[clang] [Format] Dont treat LBrace after extends/implements as initializer list (PR #108524)

2024-09-16 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/108524 ___ 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] Fix incorrect directory issue for writing files (PR #111375)

2024-10-08 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks a lot for the patch, and sorry for regressing this. I think this is also going to regress behavior in some cases (e.g. working directory in compile commands might be virtual for some build systems like bazel). When inc

[clang-tools-extra] [clang-include-cleaner] Fix incorrect directory issue for writing files (PR #111375)

2024-10-09 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > so clang-include-cleaner correctly adjusted the path to > /home/leebc/.cache/bazel/_bazel_leebc/5ea2deb937e75f0bf29ba4c49931e67d/execroot/_main/api/main.cc, > which was correctly symlinked. in our case this is symlinked to an immutable copy of the source file (to make sure b

[clang-tools-extra] [clang-include-cleaner] Fix incorrect directory issue for writing files (PR #111375)

2024-10-09 Thread kadir çetinkaya via cfe-commits
@@ -305,7 +342,32 @@ int main(int argc, const char **argv) { } } - clang::tooling::ClangTool Tool(OptionsParser->getCompilations(), + auto &CompilationDatabase = OptionsParser->getCompilations(); kadircet wrote: i think this can be simplified with som

<    1   2   3   4   5   6   7   8   9   >