[clang] 294643e - [clang][bytecode] Check lifetime of all ptr bases in placement-new (#141272)

2025-05-24 Thread via cfe-commits
Author: Timm Baeder Date: 2025-05-24T14:17:26+02:00 New Revision: 294643e4bdc843343ef20069a4d6d0de872b3303 URL: https://github.com/llvm/llvm-project/commit/294643e4bdc843343ef20069a4d6d0de872b3303 DIFF: https://github.com/llvm/llvm-project/commit/294643e4bdc843343ef20069a4d6d0de872b3303.diff L

[clang] [Clang] Fix a regression introduced by #138518 (PR #141342)

2025-05-24 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/141342 >From c0603457eb734d8a0aeb8a5c3cf131485116e303 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sat, 24 May 2025 12:37:02 +0200 Subject: [PATCH] [Clang] Fix a regression introduced by #138518 We did not han

[clang] 7cfdd74 - [Sema] Fold variable into assert to avoid warnings. NFCI

2025-05-24 Thread Benjamin Kramer via cfe-commits
Author: Benjamin Kramer Date: 2025-05-24T13:03:36+02:00 New Revision: 7cfdd74f0f25c0792047f3934c9e93ce1d4788e1 URL: https://github.com/llvm/llvm-project/commit/7cfdd74f0f25c0792047f3934c9e93ce1d4788e1 DIFF: https://github.com/llvm/llvm-project/commit/7cfdd74f0f25c0792047f3934c9e93ce1d4788e1.dif

[clang] [Clang] add fix-it hints for unknown attributes (PR #141305)

2025-05-24 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/141305 >From 2b84b21462a4e66b8681e165fcd24e3107612448 Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Sat, 24 May 2025 02:52:24 +0300 Subject: [PATCH 1/2] [Clang] add fix-it hints for unknown attributes ---

[clang-tools-extra] [clang-tidy][NFC] Refactor `modernize-use-trailing-return-type-check` check code and tests (PR #140759)

2025-05-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/140759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 24c782e - [clang] Use llvm::partition_point (NFC) (#141351)

2025-05-24 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-05-24T09:37:26-07:00 New Revision: 24c782e0030c145bc0deebc56b72a1729b9cdd64 URL: https://github.com/llvm/llvm-project/commit/24c782e0030c145bc0deebc56b72a1729b9cdd64 DIFF: https://github.com/llvm/llvm-project/commit/24c782e0030c145bc0deebc56b72a1729b9cdd64.diff L

[clang-tools-extra] [clang-tidy] Fix false positives in `bugprone-crtp-constructor-accessibility` check (PR #132543)

2025-05-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/132543 >From a23fa792a3929882cd7b496e9027cbed6a3e7dc2 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 22 Mar 2025 14:39:43 +0300 Subject: [PATCH 1/2] [clang-tidy] Fix false positives in crtp-constructor-acce

[clang-tools-extra] fb99a85 - [clang-tidy][NFC] Refactor `modernize-use-trailing-return-type-check` check code and tests (#140759)

2025-05-24 Thread via cfe-commits
Author: Baranov Victor Date: 2025-05-24T19:55:51+03:00 New Revision: fb99a850b6cee22b1406fa7408435be38d47ea11 URL: https://github.com/llvm/llvm-project/commit/fb99a850b6cee22b1406fa7408435be38d47ea11 DIFF: https://github.com/llvm/llvm-project/commit/fb99a850b6cee22b1406fa7408435be38d47ea11.diff

[clang-tools-extra] 4675f22 - [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (#129370)

2025-05-24 Thread via cfe-commits
Author: David Rivera Date: 2025-05-24T20:15:36+03:00 New Revision: 4675f2287cc6a530102759ba548558f525ed0423 URL: https://github.com/llvm/llvm-project/commit/4675f2287cc6a530102759ba548558f525ed0423 DIFF: https://github.com/llvm/llvm-project/commit/4675f2287cc6a530102759ba548558f525ed0423.diff

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-05-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/129370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-24 Thread via cfe-commits
https://github.com/Harald-R updated https://github.com/llvm/llvm-project/pull/140594 >From 24071d12afea27104aa099a669470ebb985ab1e5 Mon Sep 17 00:00:00 2001 From: Harald-R Date: Sun, 18 May 2025 19:07:59 +0300 Subject: [PATCH 1/4] Follow style configuration in clangd include cleaner --- clang

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-24 Thread via cfe-commits
@@ -262,6 +264,8 @@ TEST(IncludeCleaner, GenerateMissingHeaderDiags) { TU.Filename = "main.cpp"; TU.AdditionalFiles["a.h"] = guard("#include \"b.h\""); TU.AdditionalFiles["b.h"] = guard("void b();"); + TU.AdditionalFiles["a_angled.h"] = guard("#include \"b_angled.h\"");

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-24 Thread via cfe-commits
Harald-R wrote: > But since we have both config options, maybe there is a reason for overwrites > in this direction as well. Hmm, I was mainly focusing on the quoted -> angled case, hence why only the `AngledHeaders` filter is used. But I have to agree that following the config fully makes se

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-24 Thread via cfe-commits
@@ -306,6 +311,12 @@ TEST(IncludeCleaner, GenerateMissingHeaderDiags) { withFix({Fix(MainFile.range("insert_b"), "#include \"b.h\"\n", "#include \"b.h\""), FixMessage("add all missing includes")})), +

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-24 Thread via cfe-commits
@@ -142,6 +143,13 @@ std::vector generateMissingIncludeDiagnostics( llvm::StringRef HeaderRef{Spelling}; bool Angled = HeaderRef.starts_with("<"); +for (auto Filter : AngledHeaders) { Harald-R wrote: Done: https://github.com/llvm/llvm-project/pul

[clang] Include [[clang::require_explicit_initialization]] warnings in system headers (PR #141133)

2025-05-24 Thread via cfe-commits
higher-performance wrote: @cor3ntin feel free to chat, but in this case we do actually want to warn (and error, under -Werror) if _anybody_ (mis)uses `std::construct_at` (i.e. neglects to explicitly initialize a field that declares itself as such). It's the exact analog of using std::invoke to

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-05-24 Thread via cfe-commits
https://github.com/huixie90 edited https://github.com/llvm/llvm-project/pull/121199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-05-24 Thread via cfe-commits
https://github.com/huixie90 edited https://github.com/llvm/llvm-project/pull/121199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix a regression introduced by #138518 (PR #141342)

2025-05-24 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/141342 We did not handle the case where a variable could be initialized by a CXXParenListInitExpr. >From 987c1f567e005e8384d41e75e5f73669bee32c5d Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sat, 24 May 2025

[clang] [Clang] Fix a regression introduced by #138518 (PR #141342)

2025-05-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes We did not handle the case where a variable could be initialized by a CXXParenListInitExpr. --- Full diff: https://github.com/llvm/llvm-project/pull/141342.diff 2 Files Affected: - (modified) clang/lib/Sema/

[clang] [Clang] Fix a regression introduced by #138518 (PR #141342)

2025-05-24 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cpp -- clang/lib/Sema/SemaDecl.cpp clang/test/SemaCXX/paren-

[clang-tools-extra] [clang-tidy] Add check for assignment or comparision operators' operand in `readability-math-missing-parentheses` (PR #141345)

2025-05-24 Thread via cfe-commits
https://github.com/flovent created https://github.com/llvm/llvm-project/pull/141345 Fixes false negative in #141249. Add check for math binary operators which are operands of assignment or comparision operators. >From 5842c573aa94063ea842230f19d5807a77b130e6 Mon Sep 17 00:00:00 2001 From: f

[clang-tools-extra] [clang-tidy] Add check for assignment or comparision operators' operand in `readability-math-missing-parentheses` (PR #141345)

2025-05-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (flovent) Changes Fixes false negative in #141249. Add check for math binary operators which are operands of assignment or comparision operators. --- Full diff: https://github.com/llvm/llvm-project/pull/141345.diff 3 Files

[clang-tools-extra] [clang-tidy] Add check for assignment or comparision operators' operand in `readability-math-missing-parentheses` (PR #141345)

2025-05-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (flovent) Changes Fixes false negative in #141249. Add check for math binary operators which are operands of assignment or comparision operators. --- Full diff: https://github.com/llvm/llvm-project/pull/141345.diff 3

[clang-tools-extra] [clang-tidy] Added check 'bugprone-function-visibility-change' (PR #140086)

2025-05-24 Thread Baranov Victor via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/140086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-05-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes This change adds support for zero and global init for ComplexType #141365 --- Full diff: https://github.com/llvm/llvm-project/pull/141369.diff 11 Files Affected: - (modified) clang/include/clang/CIR/Di

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-05-24 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: - This PR has implementation for the global init Complex value. I will backport it to the incubator once it is merged. - Not totally sure if it's good idea or not to rename it to `ConstComplexAttr` similar to Const Array, Vector and Record, We can discuss it 👍🏻 https://gi

[clang-tools-extra] [clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-pointer-arithmetic (PR #127394)

2025-05-24 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/127394 >From 0e8cde49f93a4e0c81d9cdfdd78c52f077455ce1 Mon Sep 17 00:00:00 2001 From: flovent Date: Sun, 16 Feb 2025 21:07:55 +0800 Subject: [PATCH 1/3] [clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-

[clang] [Serialization] Remove an unused local variable (NFC) (PR #141358)

2025-05-24 Thread Tim Gymnich via cfe-commits
https://github.com/tgymnich approved this pull request. https://github.com/llvm/llvm-project/pull/141358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use llvm::partition_point (NFC) (PR #141351)

2025-05-24 Thread Tim Gymnich via cfe-commits
https://github.com/tgymnich approved this pull request. https://github.com/llvm/llvm-project/pull/141351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add ApplyAlwaysOnePerLineToTemplateArguments option (PR #137544)

2025-05-24 Thread Lorenzo Mauro via cfe-commits
@@ -1521,6 +1523,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { LLVMStyle.BinPackArguments = true; LLVMStyle.BinPackLongBracedList = true; LLVMStyle.BinPackParameters = FormatStyle::BPPS_BinPack; + LLVMStyle.ApplyAlwaysOnePerLineToTemplateArguments

[clang] [clang-format] Add ApplyAlwaysOnePerLineToTemplateArguments option (PR #137544)

2025-05-24 Thread Lorenzo Mauro via cfe-commits
LorenzoMauro wrote: @rmarker as of now the option```ApplyAlwaysOnePerLineToTemplateArguments``` makes any changes in the formatting only when ```BinPackParameters: AlwaysOnePerLine``` and it makes it behave as if ```BinPackParameters``` was set to ```OnePerLine``` for templates, so it puts eac

[clang-tools-extra] [clang-tidy] readability-redundant-smartptr-get: disable for smart pointers to arrays (PR #141092)

2025-05-24 Thread Baranov Victor via cfe-commits
@@ -44,7 +44,10 @@ internal::Matcher callToGet(const internal::Matcher &OnClass) { } internal::Matcher knownSmartptr() { - return recordDecl(hasAnyName("::std::unique_ptr", "::std::shared_ptr")); + return recordDecl( + hasAnyName("::std::unique_ptr", "::std::shared_ptr

[clang] [clang-format] Handle Java text blocks (PR #141334)

2025-05-24 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/141334 >From 470eca4b4d963bf5c1ba87fb2f22620eb717c848 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 23 May 2025 23:21:12 -0700 Subject: [PATCH 1/2] [clang-format] Handle Java text blocks Fix #61954 --- clang/lib/

[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

2025-05-24 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,287 @@ +//===-- WindowsHotPatch.cpp - Support for Windows hotpatching -===// +// +// 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] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2025-05-24 Thread Richard Li via cfe-commits
https://github.com/chomosuke updated https://github.com/llvm/llvm-project/pull/118568 >From b43a2602025bdacea06ced5171904fb5d765de9f Mon Sep 17 00:00:00 2001 From: chomosuke Date: Tue, 3 Dec 2024 07:10:33 + Subject: [PATCH 1/5] fixed removeFunctionArgs don't remove comma --- .../clang-tid

[clang] [clang] Fix a typo in documentation (PR #141382)

2025-05-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/141382 None >From e7b60cdd28b94d358959ef9551dc90735eceabc3 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 24 May 2025 15:03:46 -0700 Subject: [PATCH] [clang] Fix a typo in documentation --- clang/docs/

[clang] [clang] Fix a typo in documentation (PR #141382)

2025-05-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/141382.diff 1 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+1-1) ``diff diff --git a/clang/docs/ReleaseNotes.rst b/cl

[clang-tools-extra] [clang-tidy] fix false positives with deducing this in `readability-convert-member-functions-to-static` check (PR #141391)

2025-05-24 Thread via cfe-commits
https://github.com/flovent created https://github.com/llvm/llvm-project/pull/141391 Fixes #141381. Add check for `DeclRefExpr` which points to an explicit object parameter. >From 3a7260050f8e8dc271c7fe2a5ec937026136fb6b Mon Sep 17 00:00:00 2001 From: fubowen Date: Sun, 25 May 2025 09:37:47 +0

[clang-tools-extra] [clang-tidy] Fix false positives with deducing this in `readability-convert-member-functions-to-static` check (PR #141391)

2025-05-24 Thread via cfe-commits
https://github.com/flovent edited https://github.com/llvm/llvm-project/pull/141391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix false positives with deducing this in `readability-convert-member-functions-to-static` check (PR #141391)

2025-05-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (flovent) Changes Fixes #141381. Add check for `DeclRefExpr` which points to an explicit object parameter. --- Full diff: https://github.com/llvm/llvm-project/pull/141391.diff 3 Files Affected: - (modified) clang-tool

[clang-tools-extra] [clang-tidy] Fix false positives with deducing this in `readability-convert-member-functions-to-static` check (PR #141391)

2025-05-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (flovent) Changes Fixes #141381. Add check for `DeclRefExpr` which points to an explicit object parameter. --- Full diff: https://github.com/llvm/llvm-project/pull/141391.diff 3 Files Affected: - (modified) clang-tools-extra

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-05-24 Thread David Rivera via cfe-commits
RiverDave wrote: Ping :) https://github.com/llvm/llvm-project/pull/134188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2025-05-24 Thread via cfe-commits
@@ -216,6 +219,9 @@ Changes in existing checks ` check by updating suppress warnings logic for ``nullptr`` in ``std::find``. +- Improved :doc:`modernize-use-ranges EugeneZelenko wrote: Please merge with existing entry. https://github.com/llvm/llvm-projec

[clang] [clang] Fix a typo in documentation (PR #141382)

2025-05-24 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. https://github.com/llvm/llvm-project/pull/141382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and older (PR #124651)

2025-05-24 Thread via cfe-commits
https://github.com/Un1q32 updated https://github.com/llvm/llvm-project/pull/124651 >From 3cf20444591e70a8a6d8782048ca4f6c0e22 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 27 Jan 2025 18:00:34 -0500 Subject: [PATCH] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and older (i

[clang-tools-extra] [clang-tidy] Fix false positives with deducing this in `readability-convert-member-functions-to-static` check (PR #141391)

2025-05-24 Thread via cfe-commits
@@ -62,6 +62,16 @@ AST_MATCHER(CXXMethodDecl, usesThis) { return false; // Stop traversal. } +bool VisitDeclRefExpr(const DeclRefExpr *E) { + if (const auto *PVD = dyn_cast_if_present(E->getDecl()); + PVD && PVD->isExplicitObjectParameter()) { +

<    1   2