[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

[clang] fb14c83 - [StaticAnalyzer] Use llvm::is_contained (NFC) (#141371)

2025-05-24 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-05-24T14:46:01-07:00 New Revision: fb14c8338a4187f87b525a58bd653c85b9b123fd URL: https://github.com/llvm/llvm-project/commit/fb14c8338a4187f87b525a58bd653c85b9b123fd DIFF: https://github.com/llvm/llvm-project/commit/fb14c8338a4187f87b525a58bd653c85b9b123fd.diff L

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-05-24 Thread Oliver Hunt via cfe-commits
@@ -84,6 +84,21 @@ SourceLocation Sema::getLocForEndOfToken(SourceLocation Loc, unsigned Offset) { return Lexer::getLocForEndOfToken(Loc, Offset, SourceMgr, LangOpts); } +SourceRange Sema::getRangeForNextToken(SourceLocation Loc, + bool

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-05-24 Thread Oliver Hunt via cfe-commits
@@ -2164,15 +2164,29 @@ ExprResult Sema::BuildLambdaExpr(SourceLocation StartLoc, SourceLocation EndLoc, bool IsLast = (I + 1) == LSI->NumExplicitCaptures; SourceRange FixItRange; if (CaptureRange.isValid()) { +auto GetTrailingEndLocat

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-05-24 Thread Oliver Hunt via cfe-commits
@@ -84,6 +84,21 @@ SourceLocation Sema::getLocForEndOfToken(SourceLocation Loc, unsigned Offset) { return Lexer::getLocForEndOfToken(Loc, Offset, SourceMgr, LangOpts); } +SourceRange Sema::getRangeForNextToken(SourceLocation Loc, + bool

[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] [clang-format] Handle Java text blocks (PR #141334)

2025-05-24 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/141334 ___ 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 via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes 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 b

[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] [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

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

2025-05-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/141272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-05-24 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @zwuis Thanks for the feedback. I've added additional tests to cover this case https://github.com/llvm/llvm-project/pull/141305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [flang] [mlir] [flang] Add support for -mprefer-vector-width= (PR #141380)

2025-05-24 Thread Cameron McInally via cfe-commits
https://github.com/mcinally created https://github.com/llvm/llvm-project/pull/141380 This patch adds support for the -mprefer-vector-width= command line option. The parsing of this options is equivalent to Clang's and it is implemented by setting the "prefer-vector-width" function attribute.

[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-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/4] [clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-

[clang-tools-extra] [clang-tidy] Disable bugprone-multi-level-pointer-conversion in C code (PR #141209)

2025-05-24 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Ok, but that is for "some projects". If you search internet you may find examples when people omit those casts and were people add those casts. For example: https://www.tutorialspoint.com/c_standard_library/c_function_malloc.htm And with multi level pointer conversion it's easy

[clang-tools-extra] [clang-tidy] Disable bugprone-multi-level-pointer-conversion in C code (PR #141209)

2025-05-24 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. I'm accepting change and leaving final decision to you. I can always change this later in internal fork or add option later. https://github.com/llvm/llvm-project/pull/141209 ___ cfe-commits mailin

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

2025-05-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/9314 Here is the releva

[clang] [ASTMatchers][NFC] fix typos in AST-matchers docs. (PR #141307)

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

[clang] 3f3b19d - [clang][NFC] Clean up SemaChecking.cpp (#141041)

2025-05-24 Thread via cfe-commits
Author: Timm Baeder Date: 2025-05-24T16:17:37+02:00 New Revision: 3f3b19d2b788e976281be1d8441d167540d1e197 URL: https://github.com/llvm/llvm-project/commit/3f3b19d2b788e976281be1d8441d167540d1e197 DIFF: https://github.com/llvm/llvm-project/commit/3f3b19d2b788e976281be1d8441d167540d1e197.diff L

[clang] [clang][NFC] Clean up SemaChecking.cpp (PR #141041)

2025-05-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/141041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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
@@ -176,6 +176,11 @@ Changes in existing checks ` check by fixing a false positive where ``strerror`` was flagged as MT-unsafe. +- Improved :doc:`readability-math-missing-parentheses EugeneZelenko wrote: Please keep alphabetical order (by check name) in t

[clang] [clang][AST][NFC] fix spelling typos in clang AST files (PR #141346)

2025-05-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Baranov Victor (vbvictor) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/141346.diff 7 Files Affected: - (modified) clang/include/clang/AST/ASTContext.h (+5-5) - (modified) clang/include/clang/AST/ASTImporter

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

2025-05-24 Thread via cfe-commits
@@ -297,7 +301,8 @@ TEST(IncludeCleaner, GenerateMissingHeaderDiags) { Findings.UnusedIncludes.clear(); std::vector Diags = issueIncludeCleanerDiagnostics( AST, TU.Code, Findings, MockFS(), - {[](llvm::StringRef Header) { return Header.ends_with("buzz.h"); }}); +

[clang] [ASTMatchers][NFC] fix typos in AST-matchers docs. (PR #141307)

2025-05-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/141307 >From 4ee68d62a21f75110b9406c86c9c059b1c2a840d Mon Sep 17 00:00:00 2001 From: Baranov Victor Date: Sat, 24 May 2025 03:17:57 +0300 Subject: [PATCH 1/2] [ASTMatchers][NFC] fix typos in AST-matchers docs. --- c

[clang] [clang][AST][NFC] fix spelling typos in clang AST files (PR #141346)

2025-05-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/141346 None >From d10598db7d58f0c06673c81b675924bb497792be Mon Sep 17 00:00:00 2001 From: Baranov Victor Date: Sat, 24 May 2025 17:12:21 +0300 Subject: [PATCH] [clang][AST][NFC] fix spelling typos in clang AST files

[clang] [clang][AST][NFC] fix spelling typos in clang AST files (PR #141346)

2025-05-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Baranov Victor (vbvictor) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/141346.diff 7 Files Affected: - (modified) clang/include/clang/AST/ASTContext.h (+5-5) - (modified) clang/include/clang/AST/ASTImporterLookupTa

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

2025-05-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed 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] [Serialization] Remove an unused local variable (NFC) (PR #141358)

2025-05-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed 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] 3ac2b5c - [Serialization] Remove an unused local variable (NFC) (#141358)

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

[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-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
chomosuke wrote: Ping https://github.com/llvm/llvm-project/pull/118568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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-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] [clang] Use llvm::partition_point (NFC) (PR #141351)

2025-05-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/141351 None >From 1d24b61eff5dc9fb25a4769166374657041808a5 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 23 May 2025 22:53:30 -0700 Subject: [PATCH] [clang] Use llvm::partition_point (NFC) --- clang/l

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

2025-05-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/141351.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaType.cpp (+2-2) - (modified) clang/lib/StaticAnalyzer/Core/P

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

2025-05-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/141358 Note that getTimestampFilename just constructs a file name, so it's mostly a "pure" function except possible heap allocation. >From c30f6c7c2ebe80ad84f36fd9e4172f5323779a97 Mon Sep 17 00:00:00 2001 From:

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

2025-05-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Kazu Hirata (kazutakahirata) Changes Note that getTimestampFilename just constructs a file name, so it's mostly a "pure" function except possible heap allocation. --- Full diff: https://github.com/llvm/llvm-project/pull/141358.dif

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

2025-05-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that getTimestampFilename just constructs a file name, so it's mostly a "pure" function except possible heap allocation. --- Full diff: https://github.com/llvm/llvm-project/pull/141358.diff 1 Fi

[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] [CIR] Allow use different Int types together in Vec Shift Op (PR #141111)

2025-05-24 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/14 >From 05ef5317602f61debe9a4d853e61a7e508a5a00d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 22 May 2025 19:38:08 +0200 Subject: [PATCH 1/5] [CIR] Allow use different Int types together in Vec Shif

[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 f3201c1089203963f8cb73c58ea498a84848dd88 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] [llvm] Add macro to suppress -Wunnecessary-virtual-specifier (PR #139614)

2025-05-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-with-lto-ubuntu` running on `as-worker-91` while building `clang,llvm` at step 6 "build-stage1-compiler". Full details are available at: https://lab.llvm.org/buildbot/#/builders/49/builds/1544 Here is the relevant pie

[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] [CMake][Release] Build with -ffat-lto-objects (PR #140381)

2025-05-24 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: This is an improvement, but should we also strip the bitcode? Otherwise people will still get errors if they try to use the archives if their host clang version is older. https://github.com/llvm/llvm-project/pull/140381 __

[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
https://github.com/vbvictor requested changes to this pull request. https://github.com/llvm/llvm-project/pull/118568 ___ 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 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][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2025-05-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/118568 ___ 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 Baranov Victor via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: %check_clang_tidy -std=c++23 %s readability-convert-member-functions-to-static %t + +namespace std{ + class string {}; + void println(const char *format, const std::string &str) {} +} + +namespace PR141381 { +struct Hello { + std::string str_; + + vo

[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 requested changes to this pull request. 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

  1   2   >