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

2025-05-24 Thread Baranov Victor via cfe-commits
@@ -148,6 +148,9 @@ New check aliases Changes in existing checks ^^ +- Improved :doc:`boost-use-ranges + ` check to more precisely remove comma. vbvictor wrote: In discussion, I saw that we don't need release notes for this change. Ho

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

2025-05-24 Thread Baranov Victor via cfe-commits
@@ -164,6 +165,24 @@ void UseRangesCheck::registerMatchers(MatchFinder *Finder) { static void removeFunctionArgs(DiagnosticBuilder &Diag, const CallExpr &Call, ArrayRef Indexes, const ASTContext &Ctx) { + const aut

[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 Baranov Victor via cfe-commits
https://github.com/vbvictor 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] [Clang] Clean up the fix for deferred access checking (PR #141340)

2025-05-24 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/141340 https://github.com/llvm/llvm-project/commit/200f3bd39562f4d605f13567398025d30fa27d61 introduced a parsing scope to avoid deferring access checking for friend declarations. That turned out to be insufficient beca

[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] 6d1d937 - [clang][AIX] Strip unknown environment component for per target runtime directory (#140850)

2025-05-24 Thread via cfe-commits
Author: Jake Egan Date: 2025-05-24T03:05:27-04:00 New Revision: 6d1d9374bd83f83f7d631ea599e4e75f7e9163ea URL: https://github.com/llvm/llvm-project/commit/6d1d9374bd83f83f7d631ea599e4e75f7e9163ea DIFF: https://github.com/llvm/llvm-project/commit/6d1d9374bd83f83f7d631ea599e4e75f7e9163ea.diff LOG

[clang] [clang][AIX] Strip unknown environment component for per target runtime directory (PR #140850)

2025-05-24 Thread Jake Egan via cfe-commits
https://github.com/jakeegan closed https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Explain why a type trait evaluated to false. (PR #141238)

2025-05-24 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/141238 >From 19ed57f333a63665f7bc6808d353fe1fa7eea78a Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 21 May 2025 23:10:36 +0200 Subject: [PATCH 1/2] [Clang] Explain why a type trait evaluated to false. `sta

[clang] [clang][Sema] Diagnose exceptions only in non-dependent context in discarded `try/catch/throw` blocks (PR #139859)

2025-05-24 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 updated https://github.com/llvm/llvm-project/pull/139859 >From 214aa7fa765c82121cbf3e8f6cf41a0ed2e06376 Mon Sep 17 00:00:00 2001 From: Rajveer Date: Wed, 14 May 2025 13:44:31 +0530 Subject: [PATCH] [clang][Sema] Diagnose exceptions only in non-dependent context in

[clang] [clang][Sema] Diagnose exceptions only in non-dependent context in discarded `try/catch/throw` blocks (PR #139859)

2025-05-24 Thread Rajveer Singh Bharadwaj via cfe-commits
Rajveer100 wrote: I have made the changes, let me know if this is fair enough. https://github.com/llvm/llvm-project/pull/139859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0804ca8 - [Clang] Explain why a type trait evaluated to false. (#141238)

2025-05-24 Thread via cfe-commits
Author: cor3ntin Date: 2025-05-24T10:36:18+02:00 New Revision: 0804ca88abbfc5951be1e3f2ccb4fe7d46c3a410 URL: https://github.com/llvm/llvm-project/commit/0804ca88abbfc5951be1e3f2ccb4fe7d46c3a410 DIFF: https://github.com/llvm/llvm-project/commit/0804ca88abbfc5951be1e3f2ccb4fe7d46c3a410.diff LOG:

[clang] [Clang] Explain why a type trait evaluated to false. (PR #141238)

2025-05-24 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/141238 ___ 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 Nikolas Klauser via cfe-commits
@@ -3231,6 +3241,230 @@ static QualType builtinCommonTypeImpl(Sema &S, TemplateName BaseTemplate, } } +static QualType CopyCV(QualType From, QualType To) { + if (From.isConstQualified()) +To.addConst(); + if (From.isVolatileQualified()) +To.addVolatile(); + retur

[clang] [Clang] Preserve CXXParenListInitExpr in TreeTransform. (PR #138518)

2025-05-24 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Reduced test case: ``` template void invoke(_Fn __f) { __f(); } struct Duration { int lo_; int rep_hi_; int rep_lo_; }; Duration Seconds(int); struct Time { friend bool operator<(Time, Time); Duration rep_; }; Time operator+(Time, Duration); Time Now(); struct Node {

[clang] [Driver][X86] Add -m[no-]apxf to m_x86_Features_Group (PR #140874)

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

[clang] [clang][AIX] Strip unknown environment component for per target runtime directory (PR #140850)

2025-05-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `amdgpu-offload-rhel-9-cmake-build-only` running on `rocm-docker-rhel-9` while building `clang` at step 2 "update-annotated-scripts". Full details are available at: https://lab.llvm.org/buildbot/#/builders/205/builds/10303 H

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

2025-05-24 Thread via cfe-commits
@@ -3231,6 +3241,230 @@ static QualType builtinCommonTypeImpl(Sema &S, TemplateName BaseTemplate, } } +static QualType CopyCV(QualType From, QualType To) { + if (From.isConstQualified()) +To.addConst(); + if (From.isVolatileQualified()) +To.addVolatile(); + retur

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

2025-05-24 Thread via cfe-commits
cor3ntin wrote: Let me chat with @AaronBallman and @erichkeane on Monday with this. This feels like a very narrow fix for a widespread issue. - Presumably, we don't want to warn if library implementers (mis)use std::construct_at internally - There are _tons_ of other warnings that are silenc

[clang] [Clang] suggest headers on undeclared errors (PR #140247)

2025-05-24 Thread via cfe-commits
cor3ntin wrote: @jongmyeong-choi did you see that discussion here? https://github.com/llvm/llvm-project/issues/139855 There might be useful ideas https://github.com/llvm/llvm-project/pull/140247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2025-05-24 Thread via cfe-commits
@@ -3231,6 +3241,230 @@ static QualType builtinCommonTypeImpl(Sema &S, TemplateName BaseTemplate, } } +static QualType CopyCV(QualType From, QualType To) { + if (From.isConstQualified()) +To.addConst(); + if (From.isVolatileQualified()) +To.addVolatile(); + retur

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

2025-05-24 Thread via cfe-commits
@@ -3231,6 +3241,230 @@ static QualType builtinCommonTypeImpl(Sema &S, TemplateName BaseTemplate, } } +static QualType CopyCV(QualType From, QualType To) { + if (From.isConstQualified()) +To.addConst(); + if (From.isVolatileQualified()) +To.addVolatile(); + retur

<    1   2