[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-27 Thread Mariya Podchishchaeva via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: https://github.com/Fznamznon approved this pull request. That looks great imo https://github.com/llvm/llvm-project/pull/141471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [llvm] [LoongArch] Add support for half-precision floating-point type (PR #141564)

2025-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-loongarch Author: None (Ami-zhang) Changes This PR contains 3 commits: 1. Updated the FP16 implementation to pass arguments via FPR instead of the original GPR. 2. Added support for the _Float16 type and fixed 2 relate

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-27 Thread Bruno De Fraine via cfe-commits
https://github.com/brunodf-snps updated https://github.com/llvm/llvm-project/pull/137719 >From d63c8fe4fcc8e89933bf3c1cc176941b0b9094fa Mon Sep 17 00:00:00 2001 From: Bruno De Fraine Date: Mon, 28 Apr 2025 14:12:00 +0200 Subject: [PATCH 1/5] [clang][CodeGen] Make tbaa-array test more robust Av

[clang] [llvm] [LoongArch] Add support for half-precision floating-point type (PR #141564)

2025-05-27 Thread Lu Weining via cfe-commits
SixWeining wrote: LLVM uses squash and merge. So please split it into 3 PRs if you do not want to squash them. https://github.com/llvm/llvm-project/pull/141564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[libcxx] [libunwind] [llvm] [libc++] Upgrade to GCC 15 (PR #138293)

2025-05-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/138293 >From d19c634bc341b33a15ddf05de556fddd4d1bf168 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 May 2025 17:24:13 +0200 Subject: [PATCH] [libc++] Upgrade to GCC 15 --- .github/workflows/libcxx-bu

[clang] [Clang][AArch64]Add FP8 ACLE macros implementation (PR #140591)

2025-05-27 Thread via cfe-commits
https://github.com/CarolineConcatto closed https://github.com/llvm/llvm-project/pull/140591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7569de5 - [Clang][AArch64]Add FP8 ACLE macros implementation (#140591)

2025-05-27 Thread via cfe-commits
Author: CarolineConcatto Date: 2025-05-27T10:01:38+01:00 New Revision: 7569de527298a52618239ef68b9374a5c35c8b97 URL: https://github.com/llvm/llvm-project/commit/7569de527298a52618239ef68b9374a5c35c8b97 DIFF: https://github.com/llvm/llvm-project/commit/7569de527298a52618239ef68b9374a5c35c8b97.di

[libcxx] [libunwind] [llvm] [libc++] Upgrade to GCC 15 (PR #138293)

2025-05-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/138293 >From e735a57745e840f4a19bdd433e823a851890bcbe Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 May 2025 17:24:13 +0200 Subject: [PATCH] [libc++] Upgrade to GCC 15 --- .github/workflows/libcxx-bu

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-27 Thread Bruno De Fraine via cfe-commits
brunodf-snps wrote: > I was still adding test cases involving may_alias, but I still found problems This has been solved in 1a40063bc73ee468cb6c8634505232b6f2d833ec. This requires to update the member types in the struct type node in case of an array member with may_alias tag. I found it is t

[clang] [analyzer] Introduce the check::BlockEntrance checker callback (PR #140924)

2025-05-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-windows` running on `linaro-armv8-windows-msvc-05` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/141/builds/9041 Here is the relevant piece of

[clang] Thread Safety Analysis: Warn when using negative reentrant capability (PR #141599)

2025-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Marco Elver (melver) Changes The purpose of negative capabilities is documented as helping to prevent double locking, which is not an issue for most reentrant capabilities (such as mutexes). Introduce a pedantic warning group, which is e

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-05-27 Thread Marco Elver via cfe-commits
@@ -271,26 +271,32 @@ class CFGWalker { // translateAttrExpr needs it, but that should be moved too. class CapabilityExpr { private: - /// The capability expression and whether it's negated. - llvm::PointerIntPair CapExpr; + /// The capability expression and flags. + llvm::

[clang] [llvm] [WIP] Support the inline asm 'a' constraint on PowerPC (PR #141604)

2025-05-27 Thread Kamau Bridgeman via cfe-commits
https://github.com/kamaub created https://github.com/llvm/llvm-project/pull/141604 This patch adds backend and frontend support for address operand constraint `a` for GCC style inline assembly. It allows the user to specify X-FORM addressing mode operations in inline assmebly without doing a [0

[clang] [llvm] [WIP] Support the inline asm 'a' constraint on PowerPC (PR #141604)

2025-05-27 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 h,cpp,c -- clang/test/CodeGen/PowerPC/inline-asm-constraints

[clang] [C2y] Correctly handle incomplete types in generic selections (PR #141596)

2025-05-27 Thread Erich Keane via cfe-commits
@@ -1874,9 +1874,11 @@ ExprResult Sema::CreateGenericSelectionExpr( if (D != 0) { Diag(Types[i]->getTypeLoc().getBeginLoc(), D) -<< Types[i]->getTypeLoc().getSourceRange() -<< Types[i]->getType(); - TypeErrorFound = true; +

[clang] [C2y] Correctly handle incomplete types in generic selections (PR #141596)

2025-05-27 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/141596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-05-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! 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-tools-extra] [clang-tidy] Fix false positives with deducing this in `readability-convert-member-functions-to-static` check (PR #141391)

2025-05-27 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/141391 >From 084e22a7b71d5bc39ffe4f91211d04bba131122e Mon Sep 17 00:00:00 2001 From: fubowen Date: Sun, 25 May 2025 09:37:47 +0800 Subject: [PATCH 1/5] [clang-tidy] fix false positives with deducing this in `readabili

[clang] [llvm] [WIP] Support the inline asm 'a' constraint on PowerPC (PR #141604)

2025-05-27 Thread Kamau Bridgeman via cfe-commits
kamaub wrote: This is a draft PR because the type promotion errors occurring in test case [llvm/test/CodeGen/PowerPC/inline-asm-constraints-error.ll](https://github.com/llvm/llvm-project/pull/141604/files#diff-becfb4d0b9a7b0638d52047d9458c1b8cd9942a318e2895ad0f448b8bdfd2e40) are not being prope

[clang] [KeyIntsr][Clang] Builtins alloca auto-init atom (PR #134651)

2025-05-27 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -0,0 +1,77 @@ + +// RUN: %clang_cc1 -gkey-instructions -x c++ %s -debug-info-kind=line-tables-only -gno-column-info -emit-llvm -o - -ftrivial-auto-var-init=zero -fenable-matrix -disable-llvm-passes \ +// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not

[clang] [KeyInstr][Clang] Reset atomGroup number for each function (PR #141607)

2025-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Orlando Cazalet-Hyams (OCHyams) Changes CGDebugInfo::completeFunction was added previously but mistakenly not called (dropped through the cracks while putting together the patch stack). Moved out of #134652 and #134654. --- Full

[clang] [KeyInstr][Clang] Reset atomGroup number for each function (PR #141607)

2025-05-27 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams created https://github.com/llvm/llvm-project/pull/141607 CGDebugInfo::completeFunction was added previously but mistakenly not called (dropped through the cracks while putting together the patch stack). Moved out of #134652 and #134654. >From 510cb679b679f7265107127

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

2025-05-27 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -Wunknown-attributes -fsyntax-only -verify %s +// RUN: %clang_cc1 -Wunknown-attributes -fsyntax-only -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s + +[[gmu::deprected]] // expected-warning {{unknown attribute 'gmu::deprected' ignored;

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

2025-05-27 Thread Oleksandr T. via cfe-commits
@@ -7867,15 +7867,16 @@ void Sema::checkUnusedDeclAttributes(Declarator &D) { void Sema::DiagnoseUnknownAttribute(const ParsedAttr &AL) { std::string NormalizedFullName = '\'' + AL.getNormalizedFullName() + '\''; + SourceRange NR = AL.getNormalizedRange(); + SourceLocation

[clang] [C2y] Correctly handle incomplete types in generic selections (PR #141596)

2025-05-27 Thread Aaron Ballman via cfe-commits
@@ -1874,9 +1874,11 @@ ExprResult Sema::CreateGenericSelectionExpr( if (D != 0) { Diag(Types[i]->getTypeLoc().getBeginLoc(), D) -<< Types[i]->getTypeLoc().getSourceRange() -<< Types[i]->getType(); - TypeErrorFound = true; +

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,50 @@ +.. title:: clang-tidy - cppcoreguidelines-pro-bounds-avoid-unchecked-container-accesses + +cppcoreguidelines-pro-bounds-avoid-unchecked-container-accesses +=== + +Flags calls to ``operator[]`` in STL co

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

2025-05-27 Thread Erich Keane via cfe-commits
@@ -50,3 +50,29 @@ def __builtin_common_type : BuiltinTemplate< Template<[Class<"TypeMember">], "HasTypeMember">, Class<"HasNoTypeMember">, Class<"Ts", /*is_variadic=*/1>]>; + +// template class," +// template class> class BasicCommonReferenceT,"

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

2025-05-27 Thread Erich Keane 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-27 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. This seems reasonable to me? I'm not a huge fan of how much is being put into `SemaTemplate.cpp` to support all the builtins though. I'm wondering if we need to split that up in a follow-up and have a `SemaTemplateBuiltins` for all of

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-05-27 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Also, if you're compiling C++26, why is it enabling OpenCL language features? You can already do this pretty easily with `clang --target=spirv64` so long as you're okay with using vendor intrinsic extensions in SPIR-V. That's pretty much what the HIP support for SPIR-V does anyw

[clang] [KeyInstr][Clang] For stmt atom (PR #134646)

2025-05-27 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams updated https://github.com/llvm/llvm-project/pull/134646 >From 510cb679b679f7265107127cc3d57a76b576e42d Mon Sep 17 00:00:00 2001 From: Orlando Cazalet-Hyams Date: Tue, 27 May 2025 14:57:12 +0100 Subject: [PATCH 1/7] [KeyInstr][Clang] Reset atomGroup number for each f

[clang] [C2y] Correctly handle incomplete types in generic selections (PR #141596)

2025-05-27 Thread Erich Keane via cfe-commits
@@ -1874,9 +1874,11 @@ ExprResult Sema::CreateGenericSelectionExpr( if (D != 0) { Diag(Types[i]->getTypeLoc().getBeginLoc(), D) -<< Types[i]->getTypeLoc().getSourceRange() -<< Types[i]->getType(); - TypeErrorFound = true; +

[clang] [KeyIntsr][Clang] Builtins alloca auto-init atom (PR #134651)

2025-05-27 Thread Stephen Tozer via cfe-commits
@@ -0,0 +1,77 @@ + +// RUN: %clang_cc1 -gkey-instructions -x c++ %s -debug-info-kind=line-tables-only -gno-column-info -emit-llvm -o - -ftrivial-auto-var-init=zero -fenable-matrix -disable-llvm-passes \ +// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not

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

2025-05-27 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] Reapply CWG2369 "Ordering between constraints and substitution" (PR #122423)

2025-05-27 Thread Erich Keane via cfe-commits
@@ -522,6 +522,12 @@ enum class TemplateSubstitutionKind : char { llvm::PointerUnion * findInstantiationOf(const Decl *D); +/// Similar to \p findInstantiationOf(), but it wouldn't assert if the +/// instantiation was not found within the current instantiation

[clang] [Clang] Reapply CWG2369 "Ordering between constraints and substitution" (PR #122423)

2025-05-27 Thread Erich Keane via cfe-commits
@@ -8054,8 +8056,9 @@ bool Sema::CheckNonDependentConversions( bool HasThisConversion = Method && !isa(Method); unsigned ThisConversions = HasThisConversion ? 1 : 0; - Conversions = - CandidateSet.allocateConversionSequences(ThisConversions + Args.size()); + Convers

[clang] [llvm] [ARM, AArch64] Don't put BTI at asm goto branch targets (PR #141562)

2025-05-27 Thread Mark Rutland via cfe-commits
mrutland-arm wrote: I've given this a test, building a v6.15 defconfig arm64 Linux kernel with LLVM built with and without this change, and the reduction is impressive: | | before | after | change | | - | - | - | - | | `BTI J` instructions | 23,323 | 4,207

[clang] [clang][modules][deps]Remove -F option from test for clang-scan-deps (PR #141614)

2025-05-27 Thread Jamie Schmeiser via cfe-commits
https://github.com/jamieschmeiser created https://github.com/llvm/llvm-project/pull/141614 Remove the redundant -F option from test because not all platforms support -F, which is a g++ extension. The option is unnecessary because all files in the test have paths specified. >From 213401bebf9c

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

2025-05-27 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > This seems reasonable to me? I'm not a huge fan of how much is being put into > `SemaTemplate.cpp` to support all the builtins though. I'm wondering if we > need to split that up in a follow-up and have a `SemaTemplateBuiltins` for > all of these to live. I can take a look

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

2025-05-27 Thread Erich Keane via cfe-commits
https://github.com/erichkeane 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] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-27 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/134034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CLANG] Add support of shared attribute for the pragma section. (PR #128197)

2025-05-27 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam closed https://github.com/llvm/llvm-project/pull/128197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Correctly handle incomplete types in generic selections (PR #141596)

2025-05-27 Thread Aaron Ballman via cfe-commits
@@ -1874,9 +1874,11 @@ ExprResult Sema::CreateGenericSelectionExpr( if (D != 0) { Diag(Types[i]->getTypeLoc().getBeginLoc(), D) -<< Types[i]->getTypeLoc().getSourceRange() -<< Types[i]->getType(); - TypeErrorFound = true; +

[clang] [C2y] Correctly handle incomplete types in generic selections (PR #141596)

2025-05-27 Thread Erich Keane via cfe-commits
@@ -1874,9 +1874,11 @@ ExprResult Sema::CreateGenericSelectionExpr( if (D != 0) { Diag(Types[i]->getTypeLoc().getBeginLoc(), D) -<< Types[i]->getTypeLoc().getSourceRange() -<< Types[i]->getType(); - TypeErrorFound = true; +

[libclc] [llvm] [libclc] Support LLVM_ENABLE_RUNTIMES when building (PR #141574)

2025-05-27 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/141574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-05-27 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > This commit breaks a critical optimization for us. We have a project that > compiles most of the C++26 language features to Vulkan SPIRV. I've thought about doing that, since I've spent a few years just using normal C++ to write GPU runtimes. The main issue right now is that t

[clang] [clang][modules][deps]Remove -F option from test for clang-scan-deps (PR #141614)

2025-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang Author: Jamie Schmeiser (jamieschmeiser) Changes Remove the redundant -F option from test because not all platforms support -F, which is a g++ extension. The option is unnecessary because all files in the test

[clang] [KeyInstr][Clang] For stmt atom (PR #134646)

2025-05-27 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams updated https://github.com/llvm/llvm-project/pull/134646 >From 510cb679b679f7265107127cc3d57a76b576e42d Mon Sep 17 00:00:00 2001 From: Orlando Cazalet-Hyams Date: Tue, 27 May 2025 14:57:12 +0100 Subject: [PATCH 1/8] [KeyInstr][Clang] Reset atomGroup number for each f

[clang] [llvm] [ARM, AArch64] Don't put BTI at asm goto branch targets (PR #141562)

2025-05-27 Thread Simon Tatham via cfe-commits
statham-arm wrote: Wow, thanks for the proactive testing! https://github.com/llvm/llvm-project/pull/141562 ___ 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-27 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/141342 ___ 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-27 Thread Erich Keane via cfe-commits
@@ -13783,9 +13783,11 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { VDecl->getLocation(), DirectInit, Init); MultiExprArg Args = Init; -if (CXXDirectInit) - Args = MultiExprArg(CXXDirectInit->getExprs(), -

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

2025-05-27 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 1 nit, else lgtm. https://github.com/llvm/llvm-project/pull/141342 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Warn when using negative reentrant capability (PR #141599)

2025-05-27 Thread Marco Elver via cfe-commits
https://github.com/melver created https://github.com/llvm/llvm-project/pull/141599 The purpose of negative capabilities is documented as helping to prevent double locking, which is not an issue for most reentrant capabilities (such as mutexes). Introduce a pedantic warning group, which is ena

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

2025-05-27 Thread via cfe-commits
higher-performance wrote: Interesting point! A few thoughts: - Are system headers really any different from non-system headers in that case? It feels like it might be an orthogonal issue we should address in a separate PR. - Do you mean SFINAE contexts rather than merely unevaluated contexts (

[clang] [clang-format] Stop moving lambda to new line only to indent it more. (PR #141576)

2025-05-27 Thread Björn Schäpers via cfe-commits
@@ -23814,6 +23814,20 @@ TEST_F(FormatTest, FormatsLambdas) { "}", LLVMWithBeforeLambdaBody); + // Make sure we don't put the lambda on a new line when it would be indented HazardyKnusperkeks wrote: I think you can drop the comm

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

2025-05-27 Thread Richard Smith via cfe-commits
zygoloid wrote: There are [techniques](https://github.com/carbon-language/carbon-lang/blob/69ab97d7167146ae1deea662126af66f8f5523a2/common/struct_reflection.h#L74) for determining the number of fields in an aggregate type `T` by attempting to initialize with `T{}` then `T{arg}` then `T{arg, ar

[libunwind] [libunwind][AArch64] Protect PC within libunwind's context. (PR #113368)

2025-05-27 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Sorry for the delay, now that we've got the qualifier and various other features upstreamed, I'll be upstreaming our ptrauth hardening for the various runtime libraries in the not too distant future (I'm technically on vacation this week, but it may go up this week, otherwise it

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-27 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder approved this pull request. https://github.com/llvm/llvm-project/pull/140890 ___ 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 formatting and add release notes entry (PR #141584)

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

[clang-tools-extra] 317f3bd - [clang-tidy] Fix formatting and add release notes entry (#141584)

2025-05-27 Thread via cfe-commits
Author: FabianWolff Date: 2025-05-27T21:52:59+02:00 New Revision: 317f3bdcc1f96586489a9e48b494e593592b68cf URL: https://github.com/llvm/llvm-project/commit/317f3bdcc1f96586489a9e48b494e593592b68cf DIFF: https://github.com/llvm/llvm-project/commit/317f3bdcc1f96586489a9e48b494e593592b68cf.diff L

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-05-27 Thread via cfe-commits
BukeBeyond wrote: > It's not actually clang's responsibility to not break your transformation. We > don't want to break it gratuitously, but if clang is generating correct code, > your transformation needs to be flexible enough to handle it. If there's > something easy we can do to help your t

[clang-tools-extra] [clang-tidy] Fix formatting and add release notes entry (PR #141584)

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

[clang] [HIP] disable sanitizer for `__hip_cuid` (PR #141581)

2025-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Yaxun (Sam) Liu (yxsamliu) Changes Global variable `__hip_cuid_*` is for identifying purpose and does not need sanitization, therefore disable it for sanitizers. --- Full diff: https://github.com/llvm/llvm-project/pull/141581.diff

[clang] Avoid emitting a linker options section in the compiler if it is empty. (PR #139821)

2025-05-27 Thread via cfe-commits
dyung wrote: ping! https://github.com/llvm/llvm-project/pull/139821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-05-27 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Any update about the issue that I reported above? You may want to open a new issue to track that, so it can get annotated with the appropriate labels (e.g. `rejects-valid`) and get more attention by showing up on issues lists / dashboards that people may be watching. h

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

2025-05-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/140594 ___ 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-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/140594 ___ 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-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, mostly LGTM, please wait on a final look from @HighCommander4 though, he has more context about this feature overall, maybe the discrepancy on path vs spelling based match has a story. https://github.com/llvm/llvm-project/pull/140

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

2025-05-27 Thread Richard Smith via cfe-commits
zygoloid wrote: I don't think this concern is specific to system headers. I don't think we have precedent for disabling a warning in a SFINAE context. We do suppress warnings produced while substituting into a function template specialization during deduction if we end up not selecting that ov

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

2025-05-27 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/141345 >From ebccc95f59c10be8725bd380df372682976be22b Mon Sep 17 00:00:00 2001 From: flovent Date: Sat, 24 May 2025 21:29:53 +0800 Subject: [PATCH 1/2] [clang-tidy] Add check for assignment or comparision operators' o

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Paul Heidekrüger via cfe-commits
paulhdk wrote: Hi all! I've requested reviews from everyone who has reviewed the check so far. Would be awesome if we could get this merged soon! Attaching my previous comments with unresolved questions below. > Based on what @leunam99 wrote above, the following questions are still > unresolv

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

2025-05-27 Thread Erich Keane via cfe-commits
@@ -9162,6 +9162,8 @@ StmtResult TreeTransform::TransformCXXTryStmt(CXXTryStmt *S) { Handlers.push_back(Handler.getAs()); } + getSema().DiagnoseExceptionUse(S->getTryLoc(), /* IsTry */ true); erichkeane wrote: ```suggestion getSema().DiagnoseExcepti

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

2025-05-27 Thread Erich Keane via cfe-commits
@@ -14384,6 +14386,8 @@ TreeTransform::TransformCXXThrowExpr(CXXThrowExpr *E) { if (SubExpr.isInvalid()) return ExprError(); + getSema().DiagnoseExceptionUse(E->getThrowLoc(), /* IsTry */ false); erichkeane wrote: ```suggestion getSema().DiagnoseExc

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

2025-05-27 Thread Erich Keane via cfe-commits
@@ -4304,10 +4304,9 @@ StmtResult Sema::ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock, getLangOpts().OpenMPIsTargetDevice && (T.isNVPTX() || T.isAMDGCN()); // Don't report an error if 'try' is used in system headers or in an OpenMP // target region compiled

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

2025-05-27 Thread Erich Keane via cfe-commits
@@ -4410,6 +4409,21 @@ StmtResult Sema::ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock, Handlers); } +void Sema::DiagnoseExceptionUse(SourceLocation Loc, bool IsTry) { + const llvm::Triple &T = Context.getTargetInfo().getTriple(); + const

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

2025-05-27 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Mostly happy, handful of changes but none are design changes. https://github.com/llvm/llvm-project/pull/139859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

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

2025-05-27 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited 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/cfe-commits

[clang] [C2y] Correctly handle incomplete types in generic selections (PR #141596)

2025-05-27 Thread Aaron Ballman via cfe-commits
@@ -1874,9 +1874,11 @@ ExprResult Sema::CreateGenericSelectionExpr( if (D != 0) { Diag(Types[i]->getTypeLoc().getBeginLoc(), D) -<< Types[i]->getTypeLoc().getSourceRange() -<< Types[i]->getType(); - TypeErrorFound = true; +

[clang-tools-extra] [clang-tidy] Fix formatting and add release notes entry (PR #141584)

2025-05-27 Thread via cfe-commits
https://github.com/FabianWolff updated https://github.com/llvm/llvm-project/pull/141584 >From eccc89a78d2da840279d584d0b6580269b7fb3fc Mon Sep 17 00:00:00 2001 From: Fabian Wolff Date: Tue, 27 May 2025 12:13:32 + Subject: [PATCH 1/2] Run `clang-format` --- .../clang-tidy/readability/Redun

[clang] [KeyInstr][Clang] Atomic ops atoms (PR #141624)

2025-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Orlando Cazalet-Hyams (OCHyams) Changes This patch is part of a stack that teaches Clang to generate Key Instructions metadata for C and C++. The feature is only functional in LLVM if LLVM is built with CMake flag LLVM_EXPERIMENT

[clang] [KeyInstr][Clang] Atomic ops atoms (PR #141624)

2025-05-27 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams created https://github.com/llvm/llvm-project/pull/141624 This patch is part of a stack that teaches Clang to generate Key Instructions metadata for C and C++. The feature is only functional in LLVM if LLVM is built with CMake flag LLVM_EXPERIMENTAL_KEY_INSTRUCTIONs.

[clang] [KeyInstr][Clang] Atomic ops atoms (PR #141624)

2025-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Orlando Cazalet-Hyams (OCHyams) Changes This patch is part of a stack that teaches Clang to generate Key Instructions metadata for C and C++. The feature is only functional in LLVM if LLVM is built with CMake flag LLVM_EXPERIMENTAL_KEY_I

[clang] [C2y] Fix _Countof handling of VLAs (PR #141621)

2025-05-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/141621 It turns out that getVLASize() does not get you the size of a single dimension of the VLA, it gets you the full count of all elements. This caused _Countof to return invalid values on VLA ranks. Now switch

[clang] [C2y] Fix _Countof handling of VLAs (PR #141621)

2025-05-27 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/141621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add sycl_external attribute (PR #140282)

2025-05-27 Thread Mariya Podchishchaeva via cfe-commits
@@ -12909,6 +12909,10 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) { if (D->hasAttr()) return false; + if (LangOpts.SYCLIsDevice && + (!D->hasAttr() || !D->hasAttr())) Fznamznon wrote: Shouldn't that be ```suggestion if (LangOpts.SYCLI

[clang] Add sycl_external attribute (PR #140282)

2025-05-27 Thread via cfe-commits
@@ -12909,6 +12909,10 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) { if (D->hasAttr()) return false; + if (LangOpts.SYCLIsDevice && + (!D->hasAttr() || !D->hasAttr())) schittir wrote: Good catch. Thank you! https://github.com/llvm/llvm-

[clang] f3b404b - [TableGen] Fix a warning

2025-05-27 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2025-05-27T09:08:45-07:00 New Revision: f3b404be973507432cf86c177978d9de708d850c URL: https://github.com/llvm/llvm-project/commit/f3b404be973507432cf86c177978d9de708d850c DIFF: https://github.com/llvm/llvm-project/commit/f3b404be973507432cf86c177978d9de708d850c.diff L

[clang] [HLSL] Add Buffer def to frontend (PR #141086)

2025-05-27 Thread Ashley Coleman via cfe-commits
V-FEXrt wrote: @inbelic From Justin, looks like it doesn't :) (and this is a bug) https://hlsl.godbolt.org/z/sqMMffh6K I'm going to spin that off into its own task separate from this one so this doesn't get bogged down https://github.com/llvm/llvm-project/pull/141086 _

[clang] [HLSL] Add resource name argument to resource class constructors (PR #139985)

2025-05-27 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/139985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 20f1e35 - [HLSL] Add resource name argument to resource class constructors (#139985)

2025-05-27 Thread via cfe-commits
Author: Helena Kotas Date: 2025-05-27T10:41:04-07:00 New Revision: 20f1e351c79528f3bdf996baab03bca4e11704d1 URL: https://github.com/llvm/llvm-project/commit/20f1e351c79528f3bdf996baab03bca4e11704d1 DIFF: https://github.com/llvm/llvm-project/commit/20f1e351c79528f3bdf996baab03bca4e11704d1.diff

[clang] [HLSL] Add resource name argument to resource class constructors (PR #139985)

2025-05-27 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/139985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-05-27 Thread via cfe-commits
higher-performance wrote: Yeah. I'm not even sure I can think of a case with the irrelevant/unused temporaries you mention, to be honest. The way I would think about this is: this attribute is intended to be equivalent to adding an in-class member initializer that is impossible for anyone to a

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Baranov Victor via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heide

[clang] [llvm] [NVPTX] Add pm_event intrinsics (PR #141278)

2025-05-27 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/141278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Add pm_event intrinsics (PR #141278)

2025-05-27 Thread Artem Belevich via cfe-commits
@@ -177,6 +177,7 @@ let Attributes = [NoReturn] in { } let Attributes = [NoThrow] in { def __nvvm_nanosleep : NVPTXBuiltinSMAndPTX<"void(unsigned int)", SM_70, PTX63>; + def __nvvm_pm_event_mask : NVPTXBuiltin<"void(unsigned short)">; Artem-B wrote: The ar

[clang] [llvm] [NVPTX] Add pm_event intrinsics (PR #141278)

2025-05-27 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. Builtin signature needs a fix, but LGTM otherwise. https://github.com/llvm/llvm-project/pull/141278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

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

2025-05-27 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/141345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Add fortify warnings for stpcpy (PR #141646)

2025-05-27 Thread Sharjeel Khan via cfe-commits
https://github.com/Sharjeel-Khan created https://github.com/llvm/llvm-project/pull/141646 Android has local fortify warnings for functions not seen in LLVM. My plan is to upstream them all and I am starting with stpcpy. >From 1213e3a40f566270f05086a17ba51289f1fd2c09 Mon Sep 17 00:00:00 2001 Fr

[clang] [Clang][Sema] Add fortify warnings for stpcpy (PR #141646)

2025-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sharjeel Khan (Sharjeel-Khan) Changes Android has local fortify warnings for functions not seen in LLVM. My plan is to upstream them all and I am starting with stpcpy. --- Full diff: https://github.com/llvm/llvm-project/pull/141646.diff

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

2025-05-27 Thread Erich Keane via cfe-commits
erichkeane wrote: I think the unevaluated contexts DOES help a bunch, though I'm still concerned about the ability of the library to create 'temproary' objects/etc via some sort of default construction/aggregate construction, to then fill in the rest. https://github.com/llvm/llvm-project/pul

<    1   2   3   4   5   >