[clang] [clang][DebugInfo] Attach `DISubprogram` to additional call variants (PR #166202)

2025-11-03 Thread Djordje Todorovic via cfe-commits
djtodoro wrote: > This change does increase debug info size a bit. Here's a diff of object file > section sizes when compiling a recent commit of Clang using `-O2 -g` on Linux: > > ``` > FILE SIZEVM SIZE > -- -- > +1.4% +9.97Mi [ = ] 0.deb

[clang] [CIR] Upstream handling for delete array (PR #165225)

2025-11-03 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -emit-llvm %s -o %t-cir.ll +//

[clang] [CIR] Upstream handling for delete array (PR #165225)

2025-11-03 Thread Henrich Lauko via cfe-commits
@@ -4089,6 +4089,24 @@ def CIR_PrefetchOp : CIR_Op<"prefetch"> { }]; } +//===--===// +// DeleteArrayOp +//===--===// + +def CIR_DeleteArr

[clang] [CIR] Upstream handling for delete array (PR #165225)

2025-11-03 Thread Henrich Lauko via cfe-commits
@@ -4089,6 +4089,24 @@ def CIR_PrefetchOp : CIR_Op<"prefetch"> { }]; } +//===--===// +// DeleteArrayOp +//===--===// + +def CIR_DeleteArr

[clang] [CIR] Upstream handling for delete array (PR #165225)

2025-11-03 Thread Henrich Lauko via cfe-commits
@@ -4089,6 +4089,24 @@ def CIR_PrefetchOp : CIR_Op<"prefetch"> { }]; } +//===--===// +// DeleteArrayOp +//===--===// + +def CIR_DeleteArr

[clang] [CIR] Upstream handling for delete array (PR #165225)

2025-11-03 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko commented: Add also print/parse roudn-trip test for the operation to `test/CIR/IR` https://github.com/llvm/llvm-project/pull/165225 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman

[clang] [CIR] Upstream handling for delete array (PR #165225)

2025-11-03 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/165225 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Call ActOnCaseExpr even if the 'case' is missing (PR #166326)

2025-11-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This otherwise happens in ParseCaseExpression. If we don't call this, we don't perform the usual arithmetic conversions, etc. --- Full diff: https://github.com/llvm/llvm-project/pull/166326.diff 2 Files Aff

[clang] [llvm] [clang/LLVM] Add flatten_deep attribute for depth-limited inlining (1/2) (PR #165777)

2025-11-03 Thread via cfe-commits
WenleiHe wrote: > but I would like more agreement that this is a good idea This seems like a natural extension of existing flatten attribute. > Deeply nested hot paths in performance-sensitive applications I can see this being useful -- for some perf critical path, sometimes it's desirable t

[clang] C++26 Annotation (PR #166287)

2025-11-03 Thread A. Jiang via cfe-commits
@@ -4091,13 +4091,15 @@ EmitClangAttrTemplateInstantiateHelper(ArrayRef Attrs, for (auto const &ai : Args) ai->writeTemplateInstantiation(OS); frederick-vs-ja wrote: CI failure indicated that we should emit `AS_Annotation` from this file (or `Attr.

[clang] [llvm] [RISCV][llvm] Support Smpmpmt version 0.6 (PR #166322)

2025-11-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Brandon Wu (4vtomat) Changes spec: https://github.com/riscv/riscv-isa-manual/blob/smpmpmt/src/smpmpmt.adoc Co-Authored-by: Jesse Huang --- Full diff: https://github.com/llvm/llvm

[clang] [llvm] [RISCV][llvm] Support Smpmpmt version 0.6 (PR #166322)

2025-11-03 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat created https://github.com/llvm/llvm-project/pull/166322 spec: https://github.com/riscv/riscv-isa-manual/blob/smpmpmt/src/smpmpmt.adoc Co-Authored-by: Jesse Huang >From 1b8cf63b901f2ccca150fa239661f60022bf51e9 Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Mon, 3

[clang] [CIR] Upstream Exception EhInflight op (PR #165621)

2025-11-03 Thread Henrich Lauko via cfe-commits
@@ -4490,6 +4490,35 @@ def CIR_TryOp : CIR_Op<"try",[ let hasLLVMLowering = false; } +//===--===// +// Exception related: EhInflightOp +//===--

[clang] [CIR] Upstream Exception EhInflight op (PR #165621)

2025-11-03 Thread Henrich Lauko via cfe-commits
@@ -4490,6 +4490,35 @@ def CIR_TryOp : CIR_Op<"try",[ let hasLLVMLowering = false; } +//===--===// +// Exception related: EhInflightOp +//===--

[clang] [SFrame][Retry] Add assembler option --gsframe (PR #165806)

2025-11-03 Thread via cfe-commits
Sterling-Augustine wrote: > > This is the final step in assembler-level sframe support for x86. With it > > in place, clang produces sframe-sections that successfully link with gnu-ld. > > Clang's user-facing option -Wa,--gsframe, is pending discussion as well. We > clearly need to redesign th

[clang] [SFrame][Retry] Add assembler option --gsframe (PR #165806)

2025-11-03 Thread Fangrui Song via cfe-commits
MaskRay wrote: > This is the final step in assembler-level sframe support for x86. With it in > place, clang produces sframe-sections that successfully link with gnu-ld. Clang's user-facing option -Wa,--gsframe, is pending discussion as well. We clearly need to redesign the format from the gro

[clang] [llvm] [InstrProf] Fix frontend generated function hash (PR #165358)

2025-11-03 Thread Stephen Senran Zhang via cfe-commits
zsrkmyn wrote: Actually I checked it days ago, and I believe the failed test isn't related to this change. Let me update the branch and check if it's still there. https://github.com/llvm/llvm-project/pull/165358 ___ cfe-commits mailing list cfe-commit

[clang] [llvm] [InstrProf] Fix frontend generated function hash (PR #165358)

2025-11-03 Thread Stephen Senran Zhang via cfe-commits
https://github.com/zsrkmyn updated https://github.com/llvm/llvm-project/pull/165358 >From 0fc8d8d02fdf11e2a42b1c8015347ee7ab0a78e0 Mon Sep 17 00:00:00 2001 From: Senran Zhang Date: Tue, 28 Oct 2025 16:15:07 +0800 Subject: [PATCH 1/4] [InstrProf] Fix frontend generated function hash The most si

[clang] [clang-repl] Fixing vulnerabilities with respect to orc runtime (PR #165852)

2025-11-03 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev commented: Can you add tests? https://github.com/llvm/llvm-project/pull/165852 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix `readability-use-concise-preprocessor-directives` check (PR #166000)

2025-11-03 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook approved this pull request. Thank you! https://github.com/llvm/llvm-project/pull/166000 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] C++26 Annotation (PR #166287)

2025-11-03 Thread via cfe-commits
https://github.com/zebullax updated https://github.com/llvm/llvm-project/pull/166287 >From e2f13c0d8c6e5c6bed1fe445d16eed609e5f03e2 Mon Sep 17 00:00:00 2001 From: acassagnes Date: Sat, 1 Nov 2025 11:11:25 +0900 Subject: [PATCH 1/7] Add annotation to attribute tablegen Recognize annotation star

[clang] [llvm] [InstrProf] Fix frontend generated function hash (PR #165358)

2025-11-03 Thread Ellis Hoag via cfe-commits
ellishg wrote: GitHub shows one broken test that looks suspicious. Can you take a look before we merge? https://github.com/llvm/llvm-project/pull/165358 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/lis

[libunwind] [libunwind] Add CMake option to enable execute-only code generation on AArch64 (PR #140554)

2025-11-03 Thread Fangrui Song via cfe-commits
=?utf-8?q?Csan=C3=A1d_Hajd=C3=BA?= , =?utf-8?q?Csan=C3=A1d_Hajd=C3=BA?= Message-ID: In-Reply-To: https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/140554 ___ cfe-commits mailing list [email protected]

[clang] C++26 Annotation (PR #166287)

2025-11-03 Thread Timm Baeder via cfe-commits
@@ -4681,16 +4703,21 @@ void Parser::ParseCXX11AttributeSpecifierInternal(ParsedAttributes &Attrs, Diag(Tok.getLocation(), diag::err_expected) << tok::colon; } - bool AttrParsed = false; + bool hasAttribute = false; + bool hasAnnotation = false; tb

[clang] C++26 Annotation (PR #166287)

2025-11-03 Thread Timm Baeder via cfe-commits
@@ -6409,6 +6409,59 @@ static void handleRequiresCapabilityAttr(Sema &S, Decl *D, D->addAttr(RCA); } +static void handleCxx26AnnotationAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + Expr *CE = AL.getArgAsExpr(0); + if (CE->isLValue()) { +if (CE->getType()->isRecordT

[clang] [clang][openmp] Fixing Issue-162243 (PR #165562)

2025-11-03 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj updated https://github.com/llvm/llvm-project/pull/165562 >From c62f5414a6392fbe0ae7940fbfa5232576979205 Mon Sep 17 00:00:00 2001 From: Ritanya-B-Bharadwaj Date: Wed, 29 Oct 2025 19:05:24 +0530 Subject: [PATCH 1/2] Fixing Issue-162243 --- clang/lib/Sema/S

[clang] [Clang] Add elementwise ldexp builtin function (PR #166296)

2025-11-03 Thread Wenju He via cfe-commits
https://github.com/wenju-he updated https://github.com/llvm/llvm-project/pull/166296 >From e8745f9f4f9199e1ee27dfd80c6c5996d5965852 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Tue, 4 Nov 2025 04:40:00 +0100 Subject: [PATCH 1/2] [Clang] Add elementwise ldexp builtin function This PR adds __bu

[clang] [HLSL] Layout Initalizer list in Column order via index conversion (PR #166277)

2025-11-03 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/166277 >From eead25c8a7aecca9b825701d5b446a0816994128 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Mon, 3 Nov 2025 19:58:22 -0500 Subject: [PATCH 1/2] [HLSL] Layout Initalizer list in Column order via index conve

[clang] [clang-format] Option to insert spaces before the closing `*/` (#160682) (PR #162105)

2025-11-03 Thread via cfe-commits
https://github.com/Men-cotton edited https://github.com/llvm/llvm-project/pull/162105 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LifetimeSafety] Fix Python path for Windows compatibility (PR #166291)

2025-11-03 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 ready_for_review https://github.com/llvm/llvm-project/pull/166291 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LifetimeSafety] Fix Python path for Windows compatibility (PR #166291)

2025-11-03 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/166291 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LifetimeSafety] Fix Python path for Windows compatibility (PR #166291)

2025-11-03 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/166291 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LifetimeSafety] Fix Python path for Windows compatibility (PR #166291)

2025-11-03 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/166291 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] windows-benchmark-lifetime (PR #166291)

2025-11-03 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: * **#166291** https://app.graphite.dev/github/pr/llvm/llvm-project/166291?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/166291

[clang] windows-benchmark-lifetime (PR #166291)

2025-11-03 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/166291 None >From 4dae1297ad4057dc9d739bf312aa5b53cf04e8c0 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 4 Nov 2025 03:06:31 + Subject: [PATCH] windows-benchmark-lifetime --- clang/test/Analysis/Lifetim

[clang] [llvm] [X86][AVX512] rematerialize smaller predicate masks (PR #166178)

2025-11-03 Thread Phoebe Wang via cfe-commits
@@ -3173,6 +3179,23 @@ let Predicates = [HasAVX512] in { def : Pat<(v1i1 immAllOnesV), (COPY_TO_REGCLASS (KSET1W), VK1)>; } +// With AVX512DQ, use 8-bit operations for 8-bit masks to avoid setting upper +// bits +let Predicates = [HasDQI] in { + def : Pat<(v8i1 immAllZeros

[clang] C++26 Annotation (PR #166287)

2025-11-03 Thread via cfe-commits
https://github.com/zebullax edited https://github.com/llvm/llvm-project/pull/166287 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix implicit truncation of `select` non-bool vector conditions (PR #166279)

2025-11-03 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng updated https://github.com/llvm/llvm-project/pull/166279 >From 0376be937255f8d614a62503e975e30be9889567 Mon Sep 17 00:00:00 2001 From: kmpeng Date: Mon, 3 Nov 2025 17:09:15 -0800 Subject: [PATCH 1/2] remove Sz and separate vector templates into size-specific ones, add

[clang] [clang] Mark labels referenced when used in named break or continue (PR #166033)

2025-11-03 Thread via cfe-commits
@@ -3281,6 +3281,10 @@ static Scope *FindLabeledBreakContinueScope(Sema &S, Scope *CurScope, SourceLocation LabelLoc, bool IsContinue) { assert(Target && "not a named break/continue?"); +

[clang] bc08e69 - [clang][modules] Fix crash in enum visibility lookup for C++20 header units (#166272)

2025-11-03 Thread via cfe-commits
Author: Naveen Seth Hanig Date: 2025-11-04T09:54:56+08:00 New Revision: bc08e69959ecefecc7ea41b648a659aa19c458c8 URL: https://github.com/llvm/llvm-project/commit/bc08e69959ecefecc7ea41b648a659aa19c458c8 DIFF: https://github.com/llvm/llvm-project/commit/bc08e69959ecefecc7ea41b648a659aa19c458c8.d

[clang] [clang][modules] Fix crash in enum visibility lookup for C++20 header units (PR #166272)

2025-11-03 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/166272 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Fix crash in enum visibility lookup for C++20 header units (PR #166272)

2025-11-03 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. https://github.com/llvm/llvm-project/pull/166272 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-11-03 Thread Matt Arsenault via cfe-commits
arsenm wrote: I think we can get away with 0/-1/unknown https://github.com/llvm/llvm-project/pull/131557 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Mark labels referenced when used in named break or continue (PR #166033)

2025-11-03 Thread via cfe-commits
https://github.com/camc updated https://github.com/llvm/llvm-project/pull/166033 >From d758fa880bc3f41c18ff71762e7a60d5eac1aafc Mon Sep 17 00:00:00 2001 From: camc Date: Sun, 2 Nov 2025 01:21:16 + Subject: [PATCH 1/2] [clang] Mark labels referenced when used in named break or continue ---

[clang] [CIR] Fix assignment ignore in ScalarExprEmitter (PR #166118)

2025-11-03 Thread Andy Kaylor via cfe-commits
@@ -78,7 +78,7 @@ struct BinOpInfo { class ScalarExprEmitter : public StmtVisitor { CIRGenFunction &cgf; CIRGenBuilderTy &builder; - bool ignoreResultAssign; + bool ignoreResultAssign = false; andykaylor wrote: We had a discussion about this early on in

[clang] [Clang][Sema] Allow counted_by on void* as GNU extension (PR #164737)

2025-11-03 Thread Kees Cook via cfe-commits
kees wrote: FYI, GCC has landed their corresponding change to support `void *` with `counted_by`: https://github.com/gcc-mirror/gcc/commit/6951e953e01a91333bacecb9609ca12f7d83af0a https://github.com/llvm/llvm-project/pull/164737 ___ cfe-commits maili

[clang] [HLSL] Layout Initalizer list in Column order via index conversion (PR #166277)

2025-11-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-clang Author: Farzon Lotfi (farzonl) Changes fixes #165663 The bug was that we were using the initalizer lists index to populate the matrix. This meant that [0..n] would coorelate to [0..n] indicies of the flattened matrix.

[clang] [HLSL] Layout Initalizer list in Column order via index conversion (PR #166277)

2025-11-03 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/166277 fixes #165663 The bug was that we were using the initalizer lists index to populate the matrix. This meant that [0..n] would coorelate to [0..n] indicies of the flattened matrix. Hence why we were seeing the

[clang] [Clang] Mark this pointer in destructors dead_on_return (PR #166276)

2025-11-03 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/166276 This helps to clean up any dead stores that come up at the end of the destructor. The motivating example was a refactoring in libc++'s basic_string implementation in 8dae17be2991cd7f0d7fd9aa5aecd064520a1

[clang] [llvm] [clang/LLVM] Add flatten_deep attribute for depth-limited inlining (1/2) (PR #165777)

2025-11-03 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: > Let me provide some additional context on why this can be useful: I'm familiar with how AutoFDO pipelines work and assumed that was your use case. I still don't think this is a very good solution. I feel like you're going to be much better off just rolling the profile.

[clang] [Clang][Sema] Allow counted_by on void* as GNU extension (PR #164737)

2025-11-03 Thread Kees Cook via cfe-commits
@@ -132,9 +132,20 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, // `BoundsSafetyCheckUseOfCountAttrPtr` // // * When the pointee type is always an incomplete type (e.g. -// `void`) the attribute is disallowed by this method

[clang] [Clang][Sema] Allow counted_by on void* as GNU extension (PR #164737)

2025-11-03 Thread Kees Cook via cfe-commits
https://github.com/kees edited https://github.com/llvm/llvm-project/pull/164737 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Match bitsin(typeof(x)) - popcnt(x) to s_bcnt0_i32 (PR #164847)

2025-11-03 Thread Patrick Simmons via cfe-commits
@@ -1884,6 +1886,13 @@ def : GCNPat < (S_MOV_B32 (i32 0)), sub1)) >; +def : GCNPat < + (i64 (UniformBinFrag 64, (ctpop i64:$src))), +(i64 (REG_SEQUENCE SReg_64, + (i32 (COPY_TO_REGCLASS (S_BCNT0_I32_B64 $src), SReg_32)), sub0, linuxrocks123 wrot

[clang] [CIR] Upstream CXXDefaultArgExpr for AggregateExpr (PR #165991)

2025-11-03 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/165991 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Create crash reproducers for IR inputs (PR #165572)

2025-11-03 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,15 @@ +// RUN: %clang -S -emit-llvm -o %t.ll %s +// RUN: not %clang -DCRASH %s %t.ll 2>&1 | FileCheck %s efriedma-quic wrote: I suspect this regression test will break in some situations; it assumes that invoking "clang" can actually link a program, w

[clang] [Clang][Driver] Create crash reproducers for IR inputs (PR #165572)

2025-11-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/165572 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Create crash reproducers for IR inputs (PR #165572)

2025-11-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: Non-LTO IR inputs are in sort of a weird place. We have handling for them, but we don't really have any rules for exactly what kind of IR inputs we're actually expecting: the format isn't really stable, and we sort of just shove them through whateve

[clang] [CIR] Prepare a 'this' for CXXDefaultInitExprs (PR #165994)

2025-11-03 Thread Andy Kaylor via cfe-commits
@@ -230,3 +230,28 @@ void init_expr(int a, int b, int c) { // OGCG: %[[C_PLUS_THREE:.*]] = add nsw i32 %[[C]], 3 // OGCG: store i32 %[[C_PLUS_THREE]], ptr %[[S_C]] // OGCG: ret void + +void cxx_default_init_with_struct_field() { andykaylor wrote: It look

[clang] [CIR] Prepare a 'this' for CXXDefaultInitExprs (PR #165994)

2025-11-03 Thread Andy Kaylor via cfe-commits
@@ -230,3 +230,28 @@ void init_expr(int a, int b, int c) { // OGCG: %[[C_PLUS_THREE:.*]] = add nsw i32 %[[C]], 3 // OGCG: store i32 %[[C_PLUS_THREE]], ptr %[[S_C]] // OGCG: ret void + +void cxx_default_init_with_struct_field() { + struct Parent { +struct { + int

[clang] [Clang] [Docs] Add some CMake example code for linking against libclang (PR #166268)

2025-11-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes Though we have a few code examples in our documentation that show how to *use* libclang, we never actually show how to *link* against it. I myself mostly figured this out through trial and error some time ago, and

[clang] [Clang] [Docs] Add some CMake example code for linking against libclang (PR #166268)

2025-11-03 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/166268 Though we have a few code examples in our documentation that show how to *use* libclang, we never actually show how to *link* against it. I myself mostly figured this out through trial and error some time ago,

[clang] [clang] Use getFileLoc when computing getPresumedLoc (PR #166255)

2025-11-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: SKill (SergejSalnikov) Changes Now the files location is used for macro expansions. This provides more accurate location when reporting compilation errors. --- Full diff: https://github.com/llvm/llvm-pro

[clang] [clang] Use getFileLoc when computing getPresumedLoc (PR #166255)

2025-11-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: SKill (SergejSalnikov) Changes Now the files location is used for macro expansions. This provides more accurate location when reporting compilation errors. --- Full diff: https://github.com/llvm/llvm-project/pull/166255.

[clang] [clang] Use getFileLoc when computing getPresumedLoc (PR #166255)

2025-11-03 Thread via cfe-commits
https://github.com/SergejSalnikov created https://github.com/llvm/llvm-project/pull/166255 Now the files location is used for macro expansions. This provides more accurate location when reporting compilation errors. >From fef8fb267ff7a7ad52b2c5dabd4b1dff1fc8394b Mon Sep 17 00:00:00 2001 From:

[clang] [compiler-rt] [UBSan] Fix incorrect alignment reported when global new returns an o… (PR #152532)

2025-11-03 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: > This got reverted in #166197. (The revert message doesn't say why, but we've > seen the new test failing e.g. on macOS, so maybe due to that?) To clarify, Chrome ran into the following test failures: ``` Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90. FAIL: UBSan-

[clang] [Clang][Sema] Allow counted_by on void* in GNU mode (PR #164737)

2025-11-03 Thread Eli Friedman via cfe-commits
@@ -132,9 +132,20 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, // `BoundsSafetyCheckUseOfCountAttrPtr` // // * When the pointee type is always an incomplete type (e.g. -// `void`) the attribute is disallowed by this method

[clang] Issue #162051: [X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - add AVX512 KTEST/KORTEST intrinsics to be used in constexpr (PR #166103)

2025-11-03 Thread Roberto Turrado Camblor via cfe-commits
rturrado wrote: > check-clang-codegen-x86 instead of check-llvm Hm... it doesn't recognize that `check-clang-codegen-x86`. https://github.com/llvm/llvm-project/pull/166103 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/

[clang] [Clang] Allow malloc and alloc_size attributes for functions returning structs (PR #165433)

2025-11-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: Needs release note. Needs documentation update for the attribute. Since this attribute was originally defined by gcc, we should consult with gcc devs to see if they have a position on this. It would be a proble if gcc chooses some different behavio

[clang] [Driver][NFC] Don't specify offloading model in help text for -Xarch_device/host (PR #165503)

2025-11-03 Thread Alexey Bader via cfe-commits
https://github.com/bader closed https://github.com/llvm/llvm-project/pull/165503 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f77ce52 - [Driver][NFC] Don't specify offloading model in help text for -Xarch_device/host (#165503)

2025-11-03 Thread via cfe-commits
Author: jinge90 Date: 2025-11-03T21:55:38Z New Revision: f77ce52b56d025399f489a8c0aad8c18c4b06045 URL: https://github.com/llvm/llvm-project/commit/f77ce52b56d025399f489a8c0aad8c18c4b06045 DIFF: https://github.com/llvm/llvm-project/commit/f77ce52b56d025399f489a8c0aad8c18c4b06045.diff LOG: [Driv

[clang-tools-extra] [clang-tidy] Rename 'cert-err60-cpp' to 'bugprone-exception-copy-constructor-throws' (PR #164061)

2025-11-03 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/164061 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang] Make the AS of llvm.compiler.used & llvm.used elements addrspace(0)" (PR #166242)

2025-11-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jacob Lambert (lamb-j) Changes Reverts llvm/llvm-project#164432 Breaks Comgr tests with the following: [2025-11-03T19:18:20.564Z] + clang -x hip --offload-arch=amdgcnspirv -nogpulib -nogpuinc --no-gpu-bundle-output --offload-device-only

[clang] Revert "[Clang] Make the AS of llvm.compiler.used & llvm.used elements addrspace(0)" (PR #166242)

2025-11-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Jacob Lambert (lamb-j) Changes Reverts llvm/llvm-project#164432 Breaks Comgr tests with the following: [2025-11-03T19:18:20.564Z] + clang -x hip --offload-arch=amdgcnspirv -nogpulib -nogpuinc --no-gpu-bundle-output --offload-dev

[clang] Revert "[Clang] Make the AS of llvm.compiler.used & llvm.used elements addrspace(0)" (PR #166242)

2025-11-03 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 origin/main HEAD --extensions c,cpp -- clang/lib/CodeGen/CodeGenModule.cpp clang/tes

[clang] [clang] Delete duplicate code in sourcemanager (PR #166236)

2025-11-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: SKill (SergejSalnikov) Changes Now that the `SourceManager::getExpansionLoc` and `SourceManager::getSpellingLoc` functions are efficient, delete unnecessary code duplicate in `SourceManager::getDecomposedExpansionLoc` and `SourceManager:

[clang] Fix early exit when finding hip dlls AMDGPUArchByHIP.cpp (PR #166238)

2025-11-03 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [LifetimeSafety] Add statistics for missing origin (PR #166163)

2025-11-03 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 origin/main HEAD --extensions cpp,h -- clang/include/clang/Analysis/Analyses/Lifetime

[clang] [clang][DependencyScanning] Implementation of `CompilerInstanceWithContext` to Improve By-Name Queries (PR #164345)

2025-11-03 Thread Ben Langmuir via cfe-commits
@@ -339,6 +341,10 @@ class ModuleDepCollector final : public DependencyCollector { std::optional ProvidedStdCXXModule; std::vector RequiredStdCXXModules; + /// A pointer to the preprocessor callback so we can invoke it directly + /// if needed. + ModuleDepCollectorPP *

[clang] [clang][DependencyScanning] Implementation of `CompilerInstanceWithContext` to Improve By-Name Queries (PR #164345)

2025-11-03 Thread Ben Langmuir via cfe-commits
@@ -125,16 +116,33 @@ class DependencyScanningWorker { DependencyConsumer &Consumer, DependencyActionController &Controller, std::optional TUBuffer = std::nullopt); - /// Run the dependency scanning tool for a given clang driver command-line - /// for a specific

[clang] [CIR] Upstream Exception EhInflight op (PR #165621)

2025-11-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -3002,6 +3002,88 @@ mlir::LogicalResult CIRToLLVMAllocExceptionOpLowering::matchAndRewrite( return mlir::success(); } +static mlir::LLVM::LLVMStructType +getLLVMLandingPadStructTy(mlir::ConversionPatternRewriter &rewriter) { + // Create the landing pad type: struct { pt

[clang] [clang][Sema] Add fortify warnings for `unistd.h` (PR #161737)

2025-11-03 Thread Colin Kinloch via cfe-commits
https://github.com/ColinKinloch updated https://github.com/llvm/llvm-project/pull/161737 >From 98912f07d2b6f3a1d8c79d2e38407dc1d9ba2905 Mon Sep 17 00:00:00 2001 From: Colin Kinloch Date: Thu, 2 Oct 2025 22:01:40 +0100 Subject: [PATCH 1/3] [clang][Sema] Add fortify warnings for `unistd.h` Defin

[clang] [clang] Delete duplicate code in sourcemanager (PR #166236)

2025-11-03 Thread via cfe-commits
SergejSalnikov wrote: @AaronBallman, I think this cleanup CL might be nice do have. https://github.com/llvm/llvm-project/pull/166236 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Delete duplicate code in sourcemanager (PR #166236)

2025-11-03 Thread via cfe-commits
https://github.com/SergejSalnikov created https://github.com/llvm/llvm-project/pull/166236 Now that the getExpansionLoc and getSpellingLoc functions are efficient, delete unnecessary code duplicate in getDecomposedExpansionLoc and getDecomposedSpellingLoc methods. >From 6d82050994e03c246b2460

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-03 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > #165317 is a prereq for this one, right? Might be worth mentioning those so > it's easier for us to review Yes, Sorry i mentioned it in the other PR description but not here :D https://github.com/llvm/llvm-project/pull/165158 __

[clang] [CIR] Upstream handling for delete array (PR #165225)

2025-11-03 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: > I think this needs to be fixed in the incubator (using the test case I linked > above as a reference) before it is upstreamed +1 https://github.com/llvm/llvm-project/pull/165225 ___ cfe-commits mailing list [email protected]

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-03 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: https://github.com/llvm/llvm-project/pull/165317 is a prereq for this one, right? Might be worth mentioning those so it's easier for us to review https://github.com/llvm/llvm-project/pull/165158 ___ cfe-commits mailing list cfe-co

[clang] [llvm] [clang/LLVM] Add flatten_deep attribute for depth-limited inlining (1/2) (PR #165777)

2025-11-03 Thread Grigory Pastukhov via cfe-commits
grigorypas wrote: > > Can you please elaborate what do you mean by it "changes the semantics of > > alwaysinline"? I am introducing a new attribute flatten_deep both on clang > > side and LLVM side. alwaysinline should still mean the same thing. > > You said patch 2 will update the alwaysinlin

[clang] [CIR][NFC] EHScope & Cleanups Iterators and operators overloading (PR #165317)

2025-11-03 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/165317 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LifetimeSafety] Add statistics for missing origin (PR #166163)

2025-11-03 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/166163 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] EHScope & Cleanups Iterators and operators overloading (PR #165317)

2025-11-03 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > This needs a test, which means it has to be introduced with (or after) > something that mixes EH scopes with normal cleanups. I just split this part from 165158, which already includes tests, just to make it easy to review https://github.com/llvm/llvm-project/pull/165317

[clang] [CIR] Upstream handling for delete array (PR #165225)

2025-11-03 Thread Shawn K via cfe-commits
kimsh02 wrote: @andykaylor Okay, thanks for the description of the issue. I'll start taking a look at it. It may take me a while because I'm very inexperienced and don't know much of anything 😅 https://github.com/llvm/llvm-project/pull/165225 ___ cfe

[clang] Issue #162051: [X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - add AVX512 KTEST/KORTEST intrinsics to be used in constexpr (PR #166103)

2025-11-03 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon edited https://github.com/llvm/llvm-project/pull/166103 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] EHScope & Cleanups Iterators and operators overloading (PR #165317)

2025-11-03 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: This needs a test, which means it has to be introduced with (or after) something that mixes EH scopes with normal cleanups. https://github.com/llvm/llvm-project/pull/165317 ___ cfe-commits mailing list cfe-comm

[clang] [CIR] Upstream TryCallOp (PR #165303)

2025-11-03 Thread Andy Kaylor via cfe-commits
@@ -1385,7 +1385,9 @@ static mlir::LogicalResult rewriteCallOrInvoke(mlir::Operation *op, mlir::ValueRange callOperands, mlir::ConversionPatternRewriter &rewriter, const mlir::TypeConverter *converter, -mlir::FlatSymbo

[clang] [CIR] Upstream TryCallOp (PR #165303)

2025-11-03 Thread Andy Kaylor via cfe-commits
@@ -2707,6 +2707,98 @@ def CIR_CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { ]; } +def CIR_TryCallOp : CIR_CallOpBase<"try_call",[ + DeclareOpInterfaceMethods, + Terminator, AttrSizedOperandSegments +]> { + let summary = "try_call operation"; + + let descriptio

[clang] [CIR] Upstream TryCallOp (PR #165303)

2025-11-03 Thread Andy Kaylor via cfe-commits
@@ -2707,6 +2707,98 @@ def CIR_CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { ]; } +def CIR_TryCallOp : CIR_CallOpBase<"try_call",[ + DeclareOpInterfaceMethods, + Terminator, AttrSizedOperandSegments +]> { + let summary = "try_call operation"; + + let descriptio

[clang] [CIR] Upstream TryCallOp (PR #165303)

2025-11-03 Thread Andy Kaylor via cfe-commits
@@ -2707,6 +2707,98 @@ def CIR_CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { ]; } +def CIR_TryCallOp : CIR_CallOpBase<"try_call",[ andykaylor wrote: This should probably have a verifier. The two destinations need to be valid blocks in the same re

[clang] [CIR] Upstream TryCallOp (PR #165303)

2025-11-03 Thread Andy Kaylor via cfe-commits
@@ -2707,6 +2707,98 @@ def CIR_CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { ]; } +def CIR_TryCallOp : CIR_CallOpBase<"try_call",[ + DeclareOpInterfaceMethods, + Terminator, AttrSizedOperandSegments +]> { + let summary = "try_call operation"; + + let descriptio

[clang] [CIR] Upstream TryCallOp (PR #165303)

2025-11-03 Thread Andy Kaylor via cfe-commits
@@ -1452,17 +1454,21 @@ rewriteCallOrInvoke(mlir::Operation *op, mlir::ValueRange callOperands, converter->convertType(calleeFuncTy)); } - assert(!cir::MissingFeatures::opCallLandingPad()); - assert(!cir::MissingFeatures::opCallContinueBlock()); assert(!cir::Mi

[clang] [Clang] FunctionEffect analysis was missing a CXXBindTemporaryExpr's implicit call to a destructor. (PR #166110)

2025-11-03 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos updated https://github.com/llvm/llvm-project/pull/166110 >From 0ab16b664773bd7b3859ec9e6fc84217dbac1de9 Mon Sep 17 00:00:00 2001 From: Doug Wyatt Date: Sun, 2 Nov 2025 15:55:48 -0800 Subject: [PATCH 1/4] [Clang] FunctionEffect analysis was missing a CXXBindTemporar

  1   2   3   4   5   6   >