[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -450,6 +453,116 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const Attr *Attr1, const Attr *Attr2) { + // Two attributes are structurally equivalent if they are

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -1496,9 +1615,37 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, return false; } - if (Field1->isBitField()) -return IsStructurallyEquivalent(Context, Field1->getBitWidth(), -Field2->getBitWidth(

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 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 9b1f905b483a2b42e4681bbef42b2641f8ccf5ad 2bde3a9c6eb5e23b0e9274122bd6f9a50ffa3bc4 --e

[clang] [clang] Fix static_cast bypassing access control (PR #132285)

2025-03-26 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/132285 >From ac82e33db6879a8657706129fb28f3565e1899ba Mon Sep 17 00:00:00 2001 From: offsetof Date: Thu, 20 Mar 2025 20:54:58 + Subject: [PATCH 1/3] [clang] Fix static_cast bypassing access control Fix access and

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -450,6 +453,116 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const Attr *Attr1, const Attr *Attr2) { + // Two attributes are structurally equivalent if they are

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-03-26 Thread Oliver Hunt via cfe-commits
@@ -6517,8 +6517,22 @@ def warn_signed_bitfield_enum_conversion : Warning< "signed bit-field %0 needs an extra bit to represent the largest positive " "enumerators of %1">, InGroup, DefaultIgnore; +def warn_preferred_type_bitfield_too_small_for_enum : Warning< + "bit-fie

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-03-26 Thread via cfe-commits
cor3ntin wrote: Can you add the missing release note and address Aaron's feedback here? https://github.com/llvm/llvm-project/pull/116785/files#r1991458305 Otherwise LGTM https://github.com/llvm/llvm-project/pull/116785 ___ cfe-commits mailing list cfe

[clang] [analyzer] Fix format attribute handling in GenericTaintChecker (PR #132765)

2025-03-26 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: @@ -161,3 +161,45 @@ void top() { clang_analyzer_isTainted(A.data); // expected-warning {{YES}} } } // namespace gh114270 + + +namespace format_attribute { +__attribute__((__format__ (__printf__, 1, 2))) +void log_nonmet

[clang] [clang][ExtractAPI] fix a couple crashes when used via libclang (PR #132297)

2025-03-26 Thread Daniel Grumberg via cfe-commits
@@ -0,0 +1,41 @@ +// Test is line- and column-sensitive. Run lines are below + +template +class basic_vector { +public: +T x; +T y; +}; + +using my_vec = basic_vector; + +class MyClass { +my_vec myVec; +}; + +struct OuterStruct { +struct InnerStruct; +int oute

[clang] [clang][analyzer] Ignore unnamed bitfields in UninitializedObjectChecker (PR #132427)

2025-03-26 Thread Balazs Benics via cfe-commits
steakhal wrote: > My proposal is to judge the current `FieldDecl` at the beginning of the loop, > and if it's a UnamedBitField, just skip it, because at that point the > UnamedBitField's static check should be passing. If it's a NamedBitField then > it needs to be initialized to pass the stati

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Ryotaro Kasuga via cfe-commits
@@ -170,11 +161,10 @@ LoopInfo::createUnrollAndJamMetadata(const LoopAttributes &Attrs, MDNode::get(Ctx, MDString::get(Ctx, "llvm.loop.unroll_and_jam.disable"))); bool FollowupHasTransforms = false; - MDNode *Followup = createPartialUnrollMetadata(Attrs, FollowupLoo

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Ryotaro Kasuga via cfe-commits
@@ -44,23 +44,19 @@ MDNode *LoopInfo::createPipeliningMetadata(const LoopAttributes &Attrs, else if (Attrs.PipelineInitiationInterval != 0) Enabled = true; + SmallVector Args; + Args.append(LoopProperties.begin(), LoopProperties.end()); + if (Enabled != true) { -

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Ryotaro Kasuga via cfe-commits
https://github.com/kasuga-fj commented: > Possibly the `create*Metadata` should only return a list of properties > instead of an MDNode, with the MDNode only to be created when applying the > properties to a Loop. However, the easier fix would probably be to extract > the properties from the

[clang] [clang] fix constexpr-unknown handling of self-references. (PR #132990)

2025-03-26 Thread via cfe-commits
@@ -3629,17 +3644,17 @@ static bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, Result = VD->getEvaluatedValue(); - // C++23 [expr.const]p8 - // ... For such an object that is not usable in constant expressions, the - // dynamic type of the object is constexpr-un

[clang] [clang] fix constexpr-unknown handling of self-references. (PR #132990)

2025-03-26 Thread via cfe-commits
https://github.com/cor3ntin commented: Thanks. I think the direction makes sense Do you intend to backport this change to 20? https://github.com/llvm/llvm-project/pull/132990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-26 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng updated https://github.com/llvm/llvm-project/pull/132288 >From 7853b27b8fffa6d2c0393a4004abaac9a7954608 Mon Sep 17 00:00:00 2001 From: kmpeng Date: Tue, 18 Mar 2025 13:25:10 -0700 Subject: [PATCH 1/8] create int_spv_smoothstep intrinsic, create smoothstep lowering & m

[clang] [llvm] [AArch64] Add FEAT_FPAC to Grace (PR #133054)

2025-03-26 Thread Sjoerd Meijer via cfe-commits
https://github.com/sjoerdmeijer created https://github.com/llvm/llvm-project/pull/133054 This feature is supported in Grace, but wasn't specified in the CPU definition. This is not important for codegen, but is good for completeness, and good for other tools that could query the CPU definition

[clang] [llvm] [AArch64] Add FEAT_FPAC to Grace (PR #133054)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Sjoerd Meijer (sjoerdmeijer) Changes This feature is supported in Grace, but wasn't specified in the CPU definition. This is not important for codegen, but is good for completeness, and good for other tools that could query the

[clang] [llvm] [AArch64] Add FEAT_FPAC to Grace (PR #133054)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Sjoerd Meijer (sjoerdmeijer) Changes This feature is supported in Grace, but wasn't specified in the CPU definition. This is not important for codegen, but is good for completeness, and good for other tools that could query the CPU

[clang] [RFC][clang] Fix for regression #130917 (PR #132214)

2025-03-26 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin edited https://github.com/llvm/llvm-project/pull/132214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix format attribute handling in GenericTaintChecker (PR #132765)

2025-03-26 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/132765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [flang] [llvm] [AMDGPU] Add "lds-buffer-load-insts" attribute for all targets < gfx11 (PR #133055)

2025-03-26 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez created https://github.com/llvm/llvm-project/pull/133055 This are used to restrict the availability of buffer_load_lds intrinsics to targets that actually have this instructions. From eae04b28a010045bdd7fcd03f84c952abeed3ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?

[clang] [flang] [llvm] [AMDGPU] Add "lds-buffer-load-insts" attribute for all targets < gfx11 (PR #133055)

2025-03-26 Thread Juan Manuel Martinez Caamaño via cfe-commits
jmmartinez wrote: Squashed first commit from https://github.com/llvm/llvm-project/pull/132048 https://github.com/llvm/llvm-project/pull/133055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [flang] [llvm] [Clang][AMDGPU] Expose buffer load lds as a clang builtin (PR #132048)

2025-03-26 Thread Juan Manuel Martinez Caamaño via cfe-commits
jmmartinez wrote: Squashed and split in 2: https://github.com/llvm/llvm-project/pull/133055 https://github.com/llvm/llvm-project/pull/132048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [llvm] [AArch64] Add FEAT_FPAC to Grace (PR #133054)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sjoerd Meijer (sjoerdmeijer) Changes This feature is supported in Grace, but wasn't specified in the CPU definition. This is not important for codegen, but is good for completeness, and good for other tools that could query the CPU defini

[clang] [clang] fix constexpr-unknown handling of self-references. (PR #132990)

2025-03-26 Thread via cfe-commits
@@ -3485,11 +3485,27 @@ static bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, APValue::LValueBase Base(VD, Frame ? Frame->Index : 0, Version); + auto CheckUninitReference = [&] { +if (!Result->hasValue() && VD->getType()->isReferenceType()) { + // We can

[clang] [clang] fix constexpr-unknown handling of self-references. (PR #132990)

2025-03-26 Thread via cfe-commits
@@ -3629,17 +3644,17 @@ static bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, Result = VD->getEvaluatedValue(); - // C++23 [expr.const]p8 - // ... For such an object that is not usable in constant expressions, the - // dynamic type of the object is constexpr-un

[clang] [clang][bytecode] Fail on mutable reads from revisited variables (PR #133064)

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

[clang] [llvm] [AArch64] Add FEAT_FPAC to Neoverse V2 (PR #133054)

2025-03-26 Thread Sjoerd Meijer via cfe-commits
https://github.com/sjoerdmeijer updated https://github.com/llvm/llvm-project/pull/133054 >From e6af1a3ef41cce2a27b1f0719f58bf82ce55b0db Mon Sep 17 00:00:00 2001 From: Sjoerd Meijer Date: Wed, 26 Mar 2025 01:38:46 -0700 Subject: [PATCH] [AArch64] Add FEAT_FPAC to Neoverse V2 This feature is sup

[clang] [llvm] [AArch64] Add FEAT_FPAC to Neoverse V2 (PR #133054)

2025-03-26 Thread Ricardo Jesus via cfe-commits
@@ -555,7 +555,8 @@ def TuneNeoverseV2 : SubtargetFeature<"neoversev2", "ARMProcFamily", "NeoverseV2 FeatureEnableSelectOptimize, FeatureUseFixedOverScalableIfEqualCost,

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

2025-03-26 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/132543 >From 814972e0398507a5137a1ee6c69e7bba3704eb6b 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] [clang][bytecode] Print more info in Block::dump() (PR #133062)

2025-03-26 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` running on `linaro-clang-aarch64-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/14439 Here is the relevant pie

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

2025-03-26 Thread Baranov Victor via cfe-commits
vbvictor wrote: > maybe we should mention it in check's doc also. Added mention of this behavior in docs. https://github.com/llvm/llvm-project/pull/132543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Ryotaro Kasuga via cfe-commits
https://github.com/kasuga-fj edited https://github.com/llvm/llvm-project/pull/131985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 322b2fe - [clang][analyzer] Move 'alpha.core.FixedAddressDereference' out of alpha (#132404)

2025-03-26 Thread via cfe-commits
Author: Balázs Kéri Date: 2025-03-26T09:24:18+01:00 New Revision: 322b2fe61e03119ce9ef0ab5481238c011bdf2b9 URL: https://github.com/llvm/llvm-project/commit/322b2fe61e03119ce9ef0ab5481238c011bdf2b9 DIFF: https://github.com/llvm/llvm-project/commit/322b2fe61e03119ce9ef0ab5481238c011bdf2b9.diff L

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -478,16 +478,24 @@ def warn_odr_function_type_inconsistent : Warning< "external function %0 declared with incompatible types in different " "translation units (%1 vs. %2)">, InGroup; +def err_odr_attr_inconsistent : Error< + "attribute %0 is incompatible%select{| in d

[clang] [llvm] [AArch64] Add FEAT_FPAC to Neoverse V2 (PR #133054)

2025-03-26 Thread Ricardo Jesus via cfe-commits
@@ -19,6 +19,7 @@ // CHECK-NEXT: FEAT_ETE Enable Embedded Trace Extension // CHECK-NEXT: FEAT_FCMA Enable Armv8.3-A Floating-point complex number support // CHECK-NEXT: FEAT

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -450,6 +453,116 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const Attr *Attr1, const Attr *Attr2) { + // Two attributes are structurally equivalent if they are

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -450,6 +453,116 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const Attr *Attr1, const Attr *Attr2) { + // Two attributes are structurally equivalent if they are

[clang] [clang-tools-extra] Reland: [clang] NFC: Clear some uses of MemberPointerType::getClass (PR #132317)

2025-03-26 Thread Jordan Rupprecht via cfe-commits
rupprecht wrote: > The reduced test case: > > ``` > template > struct A; > template > struct A {}; > template > void e(T) { > A f; > } > struct S { > struct C { > void h(int &, S *); > }; > void i() { e(&C::h); } > }; > ``` > > https://gcc.godbolt.org/z/8Pq9EWbTv That's the same

[clang] [clang] fix constexpr-unknown handling of self-references. (PR #132990)

2025-03-26 Thread via cfe-commits
@@ -3485,11 +3485,27 @@ static bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, APValue::LValueBase Base(VD, Frame ? Frame->Index : 0, Version); + auto CheckUninitReference = [&] { +if (!Result->hasValue() && VD->getType()->isReferenceType()) { + // We can

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread via cfe-commits
@@ -450,6 +453,116 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const Attr *Attr1, const Attr *Attr2) { + // Two attributes are structurally equivalent if they are

[clang] [clang] fix constexpr-unknown handling of self-references. (PR #132990)

2025-03-26 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/132990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove duplicate API (PR #132776)

2025-03-26 Thread via cfe-commits
https://github.com/Jugst3r updated https://github.com/llvm/llvm-project/pull/132776 >From f1edd98dfbe2a32e593e1a1a341838d3ccdbd38f Mon Sep 17 00:00:00 2001 From: Matthieu Eyraud Date: Mon, 24 Mar 2025 14:38:50 + Subject: [PATCH] Remove duplicate API And adapt the existing code to account f

[clang-tools-extra] [clang-tidy] Improve `bugprone-capturing-this-in-member-variable` check: add support of `bind` functions. (PR #132635)

2025-03-26 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/132635 >From c91ad611e7a64b08a243a4a7f07a7f51e96b8ac0 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sun, 23 Mar 2025 23:57:15 +0300 Subject: [PATCH 1/3] [clang-tidy] Add support of `bind` function calls that ca

[clang] [flang] [llvm] [AMDGPU] Add "lds-buffer-load-insts" attribute for all targets < gfx11 (PR #133055)

2025-03-26 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/133055 From eae04b28a010045bdd7fcd03f84c952abeed3ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Thu, 20 Mar 2025 13:23:25 +0100 Subject: [PATCH 1/2] [AMDGPU] Add "lds-bu

[clang] [flang] [llvm] [AMDGPU] Add "lds-buffer-load-insts" attribute for all targets < gfx11 (PR #133055)

2025-03-26 Thread Juan Manuel Martinez Caamaño via cfe-commits
@@ -3368,7 +3368,8 @@ bool AMDGPUInstructionSelector::selectG_INSERT_VECTOR_ELT( } bool AMDGPUInstructionSelector::selectBufferLoadLds(MachineInstr &MI) const { - assert(!AMDGPU::isGFX12Plus(STI)); + if (!Subtarget->hasLDSBufferLoad()) jmmartinez wrote: Tha

[clang] [RFC][clang] Fix for regression #130917 (PR #132214)

2025-03-26 Thread Dmitry Polukhin via cfe-commits
@@ -2572,7 +2572,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl( // Friend function defined withing class template may stop being function // definition during AST merges from different modules, in this case decl // with function body should be used for instantiat

[clang] [clang] Decay types of function and constant template parameter packs (PR #132189)

2025-03-26 Thread via cfe-commits
@@ -1518,7 +1526,7 @@ NamedDecl *Sema::ActOnNonTypeTemplateParameter(Scope *S, Declarator &D, QualType T = CheckNonTypeTemplateParameterType(TInfo, D.getIdentifierLoc()); if (T.isNull()) { -T = Context.IntTy; // Recover with an 'int' type. +T = TInfo->getType(); -

[clang] [RFC][clang] Fix for regression #130917 (PR #132214)

2025-03-26 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin edited https://github.com/llvm/llvm-project/pull/132214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve `bugprone-capturing-this-in-member-variable` check: add support of `bind` functions. (PR #132635)

2025-03-26 Thread Baranov Victor via cfe-commits
@@ -87,33 +94,54 @@ void CapturingThisInMemberVariableCheck::registerMatchers(MatchFinder *Finder) { // [self = this] capturesVar(varDecl(hasInitializer(cxxThisExpr()); auto IsLambdaCapturingThis = - lambdaExpr(hasAnyCapture(CaptureThis.bind("capture")))

[clang] [Clang] Check PP presence when printing stats (PR #131608)

2025-03-26 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM. Will you need me to merge this for you? https://github.com/llvm/llvm-project/pull/131608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang-tools-extra] [clang-tidy][misc-const-correctness] fix fp when using const array type. (PR #133018)

2025-03-26 Thread Baranov Victor via cfe-commits
@@ -161,6 +163,7 @@ void ConstCorrectnessCheck::check(const MatchFinder::MatchResult &Result) { VariableCategory VC = VariableCategory::Value; const QualType VT = Variable->getType(); + VT->dump(); vbvictor wrote: Is this left unintentionally? https://

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-26 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/132974 >From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 21 Mar 2025 21:07:11 +0100 Subject: [PATCH 1/4] [CIR] [Upstream local initialization for ArrayType ---

[clang] [llvm] [AArch64] Add FEAT_FPAC to Neoverse V2 (PR #133054)

2025-03-26 Thread Sjoerd Meijer via cfe-commits
@@ -555,7 +555,8 @@ def TuneNeoverseV2 : SubtargetFeature<"neoversev2", "ARMProcFamily", "NeoverseV2 FeatureEnableSelectOptimize, FeatureUseFixedOverScalableIfEqualCost,

[clang] [llvm] [AArch64] Add FEAT_FPAC to Neoverse V2 (PR #133054)

2025-03-26 Thread Sjoerd Meijer via cfe-commits
https://github.com/sjoerdmeijer updated https://github.com/llvm/llvm-project/pull/133054 >From 39ac7e676ced6be75d12adbae4644a232e471f6e Mon Sep 17 00:00:00 2001 From: Sjoerd Meijer Date: Wed, 26 Mar 2025 04:38:48 -0700 Subject: [PATCH] [AArch64] Add FEAT_FPAC to Neoverse V2 This feature is sup

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -1496,9 +1615,37 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, return false; } - if (Field1->isBitField()) -return IsStructurallyEquivalent(Context, Field1->getBitWidth(), -Field2->getBitWidth(

[clang-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-03-26 Thread St. Muench via cfe-commits
@@ -92,3 +92,162 @@ const char name[] = "Some string"; void takeCharArray(const char name[]); // CHECK-MESSAGES: :[[@LINE-1]]:26: warning: do not declare C-style arrays, use 'std::array' or 'std::vector' instead [modernize-avoid-c-arrays] + +namespace std { + template + str

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,472 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c23 -pedantic -Wall -Wno-comment -verify=both,c23 %s +// RUN: %clang_cc1 -fsyntax-only -std=c17 -pedantic -Wall -Wno-comment -Wno-c23-extensions -verify=both,c17 %s + +/* WG14 N3037: + * Improved tag compatibility + * + *

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-26 Thread via cfe-commits
@@ -37,13 +37,6 @@ namespace std_example { static_assert(D); template struct D_check {}; // expected-note{{because 'short' does not satisfy 'D'}} using dc1 = D_check; // expected-error{{constraints not satisfied for class template 'D_check' [with T = short]}} - - templ

[clang] [llvm] [AArch64] Add FEAT_FPAC to Neoverse V2 (PR #133054)

2025-03-26 Thread Ricardo Jesus via cfe-commits
https://github.com/rj-jesus approved this pull request. Except for a seemingly out-of-order test, LGTM! https://github.com/llvm/llvm-project/pull/133054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [clang][analyzer] Correctly handle structured bindings captured by lambda (PR #132579)

2025-03-26 Thread via cfe-commits
https://github.com/isuckatcs approved this pull request. https://github.com/llvm/llvm-project/pull/132579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -1496,9 +1615,37 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, return false; } - if (Field1->isBitField()) -return IsStructurallyEquivalent(Context, Field1->getBitWidth(), -Field2->getBitWidth(

[clang] [RFC][clang] Handle friend function that was a definition but became only a declaration during AST deserialization (PR #132214)

2025-03-26 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin edited https://github.com/llvm/llvm-project/pull/132214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,472 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c23 -pedantic -Wall -Wno-comment -verify=both,c23 %s +// RUN: %clang_cc1 -fsyntax-only -std=c17 -pedantic -Wall -Wno-comment -Wno-c23-extensions -verify=both,c17 %s + +/* WG14 N3037: + * Improved tag compatibility + * + *

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -43,6 +43,9 @@ struct StructuralEquivalenceContext { /// key: (from, to, IgnoreTemplateParmDepth) using NonEquivalentDeclSet = llvm::DenseSet>; + /// The language options to use for making a structural equivalence check. + const LangOptions &LangOpts; + --

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -450,6 +453,116 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const Attr *Attr1, const Attr *Attr2) { + // Two attributes are structurally equivalent if they are

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -1454,6 +1567,12 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, QualType Owner2Type) { const auto *Owner2 = cast(Field2->getDeclContext()); + // In C23 mode, check for structural equivalence of attribu

[clang] [llvm] [VectorCombine] Shrink loads used in shufflevector rebroadcasts (PR #128938)

2025-03-26 Thread via cfe-commits
github-actions[bot] wrote: :warning: undef deprecator found issues in your code. :warning: You can test this locally with the following command: ``bash git diff -U0 --pickaxe-regex -S '([^a-zA-Z0-9#_-]undef[^a-zA-Z0-9_-]|UndefValue::get)' f161b1b5265baadc443506b88bd1084adccaef90

[clang] [HLSL] Add __spirv__ macro (PR #132848)

2025-03-26 Thread Steven Perron via cfe-commits
https://github.com/s-perron approved this pull request. This is useful because to will match the DXC behaviour, and make code more easier to port. Even if we have `__SPIRV__` is to good to have `__spirv__`. https://github.com/llvm/llvm-project/pull/132848 ___

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-26 Thread Kajetan Puchalski via cfe-commits
mrkajetanp wrote: > Apart from the docstrings, this looks good. Thanks for the changes :-) Done, thanks a lot for the review! :) https://github.com/llvm/llvm-project/pull/132801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-26 Thread Kajetan Puchalski via cfe-commits
https://github.com/mrkajetanp updated https://github.com/llvm/llvm-project/pull/132801 >From d9b2a86d01688b69b8f116f6b52caeec8cd6e756 Mon Sep 17 00:00:00 2001 From: Kajetan Puchalski Date: Mon, 24 Mar 2025 17:28:03 + Subject: [PATCH 1/5] [flang] Add -f[no-]slp-vectorize flags Add -f[no-]sl

[clang] [flang] [llvm] [AMDGPU] Add "lds-buffer-load-insts" attribute for all targets < gfx11 (PR #133055)

2025-03-26 Thread Matt Arsenault via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= Message-ID: In-Reply-To: arsenm wrote: Oh, there was a change. The instruction is new, but previously it was a bit set on the regular load instruction https://github.com/llvm/llvm-project/pull/133055 ___ cf

[clang] [PATCH] [clang][frontend] Fix AllocKind retrieving for `CXXConstructorDecl` refs #132794 (PR #133077)

2025-03-26 Thread Paul Schwabauer via cfe-commits
https://github.com/koplas edited https://github.com/llvm/llvm-project/pull/133077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PATCH] [clang][frontend] Fix AllocKind retrieving for `CXXConstructorDecl` refs #132794 (PR #133077)

2025-03-26 Thread Paul Schwabauer via cfe-commits
https://github.com/koplas updated https://github.com/llvm/llvm-project/pull/133077 >From 686a9a772400316e5597409c7bd14f4d73e353bf Mon Sep 17 00:00:00 2001 From: koplas Date: Wed, 26 Mar 2025 13:49:44 +0100 Subject: [PATCH] [PATCH] [clang][frontend] Fix AllocKind retrieving for `CXXConstructorD

[clang] [clang-cl] Accept the --warning-suppression-mappings= option (PR #133092)

2025-03-26 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem created https://github.com/llvm/llvm-project/pull/133092 None >From 7a874d12661de2fe93ac5eba8e68edf25053f462 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Wed, 26 Mar 2025 15:24:44 +0100 Subject: [PATCH] [clang-cl] Accept the --warning-suppression-mappings= optio

[clang] [clang-cl] Accept the --warning-suppression-mappings= option (PR #133092)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Hans Wennborg (zmodem) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/133092.diff 2 Files Affected: - (modified) clang/include/clang/Driver/Options.td (+1-1) - (modified) clang/test/Driver/cl-options.c (+1)

[clang] [PATCH] [clang][frontend] Fix AllocKind retrieving for `CXXConstructorDecl` refs #132794 (PR #133077)

2025-03-26 Thread Paul Schwabauer via cfe-commits
https://github.com/koplas ready_for_review https://github.com/llvm/llvm-project/pull/133077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Decay types of function and constant template parameter packs (PR #132189)

2025-03-26 Thread via cfe-commits
@@ -1277,19 +1278,27 @@ QualType Sema::CheckNonTypeTemplateParameterType(TypeSourceInfo *&TSI, TSI = SubstAutoTypeSourceInfoDependent(TSI); } - return CheckNonTypeTemplateParameterType(TSI->getType(), Loc); + return CheckNonTypeTemplateParameterType(TSI->getType(), Lo

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-03-26 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: Have nothing more to do for this now, so waiting for review. https://github.com/llvm/llvm-project/pull/109164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] emit -Wunused-variable warning for unused structured bindings without the [[maybe_unused]] attribute (PR #127061)

2025-03-26 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk closed https://github.com/llvm/llvm-project/pull/127061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c419260 - [Serialization] Avoid iterating Dense{Map,Set} to break determinism

2025-03-26 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-03-26T16:01:08+08:00 New Revision: c41926013fd8b23c3d1eca51804a2de36c88433a URL: https://github.com/llvm/llvm-project/commit/c41926013fd8b23c3d1eca51804a2de36c88433a DIFF: https://github.com/llvm/llvm-project/commit/c41926013fd8b23c3d1eca51804a2de36c88433a.diff LO

[clang] [clang][analyzer] Move 'alpha.core.FixedAddressDereference' out of alpha (PR #132404)

2025-03-26 Thread Balázs Kéri via cfe-commits
https://github.com/balazske closed https://github.com/llvm/llvm-project/pull/132404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-03-26 Thread Serge Pavlov via cfe-commits
spavloff wrote: Fixed in https://github.com/llvm/llvm-project/pull/132559. https://github.com/llvm/llvm-project/pull/131649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [FMV][AArch64] Add feature CSSC and detect on linux platform. (PR #132727)

2025-03-26 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/132727 >From b61d23aa9950d24ca88780fbcc08935447e987fd Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Mon, 24 Mar 2025 12:15:58 + Subject: [PATCH] [FMV][AArch64] Add feature CSSC and detect on linux pla

[clang] [clang] Implement CWG2815 (PR #132778)

2025-03-26 Thread Younan Zhang via cfe-commits
@@ -5229,10 +5229,23 @@ TryReferenceInit(Sema &S, Expr *Init, QualType DeclType, S.CompareReferenceRelationship(DeclLoc, T1, T2, &RefConv); auto SetAsReferenceBinding = [&](bool BindsDirectly) { +// C++2c [over.ics.ref] p1: zyn0217 wrote: This doe

[clang] [llvm] [LoopUtils] Fix metadata generated by makeFollowupLoopID (PR #131985)

2025-03-26 Thread Ryotaro Kasuga via cfe-commits
https://github.com/kasuga-fj updated https://github.com/llvm/llvm-project/pull/131985 >From 889f40c5570af8a02e301c2bf3c6382f69210140 Mon Sep 17 00:00:00 2001 From: Ryotaro Kasuga Date: Mon, 17 Mar 2025 11:24:47 + Subject: [PATCH 1/3] [LoopUtils] Fix metadata generated by makeFollowupLoopID

[clang] [CIR] Implement lowering of int-to-bool casts (PR #132996)

2025-03-26 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/132996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Ryotaro Kasuga via cfe-commits
https://github.com/kasuga-fj edited https://github.com/llvm/llvm-project/pull/131985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[clang][bytecode] Implement __builtin_{wcscmp,wcsncmp} (#132… (PR #132963)

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

[clang] cd3798d - [FMV][AArch64] Add feature CSSC and detect on linux platform. (#132727)

2025-03-26 Thread via cfe-commits
Author: Alexandros Lamprineas Date: 2025-03-26T08:40:29Z New Revision: cd3798d7ef098c65377feabbd7713b73fd47728b URL: https://github.com/llvm/llvm-project/commit/cd3798d7ef098c65377feabbd7713b73fd47728b DIFF: https://github.com/llvm/llvm-project/commit/cd3798d7ef098c65377feabbd7713b73fd47728b.di

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-03-26 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: My main concern about this patch is putting the implementation into the config file. We must be very careful with what we add to the config file, because it must remain there unchanged forever. We must have an upfront design that we believe will hold for the next N years w

[clang] [clang][analyzer] Move 'alpha.core.FixedAddressDereference' out of alpha (PR #132404)

2025-03-26 Thread LLVM Continuous Integration via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-26 Thread via cfe-commits
@@ -1829,10 +1829,18 @@ class DeclContext { // refers to an enclosing template for hte purposes of [temp.friend]p9. LLVM_PREFERRED_TYPE(bool) uint64_t FriendConstraintRefersToEnclosingTemplate : 1; + +// Indicates this function is type aware operator new or dele

[clang] [compiler-rt] [llvm] [FMV][AArch64] Add feature CSSC and detect on linux platform. (PR #132727)

2025-03-26 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/132727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [clang] rename InlinedTrapFuncMap to InlinedSubprogramMap (PR #132993)

2025-03-26 Thread Florian Mayer via cfe-commits
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/132993 None >From 4bd5834b5f32250269e67a9b26e406b9e01a37b1 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Tue, 25 Mar 2025 14:05:31 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-26 Thread via cfe-commits
@@ -1866,13 +1959,13 @@ static UsualDeallocFnInfo resolveDeallocationOverload( BestFns->push_back(Info); continue; } - -if (Best.isBetterThan(Info, WantSize, WantAlign)) +int ComparisonResult = Best.Compare(S, Info, IDP); +if (ComparisonResult > 0)

[clang] [llvm] [AArch64] Add FEAT_FPAC to Grace (PR #133054)

2025-03-26 Thread via cfe-commits
https://github.com/Jojad9 approved this pull request. Approve to this change https://github.com/llvm/llvm-project/pull/133054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread via cfe-commits
@@ -450,6 +453,116 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const Attr *Attr1, const Attr *Attr2) { + // Two attributes are structurally equivalent if they are

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread via cfe-commits
@@ -450,6 +453,116 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const Attr *Attr1, const Attr *Attr2) { + // Two attributes are structurally equivalent if they are

<    1   2   3   4   5   6   >