[clang] [CIR] Upstream ShuffleDynamicOp for VectorType (PR #141411)

2025-05-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: I have a concern about the masking for the lowering to LLVM IR. Other than that, this looks good. https://github.com/llvm/llvm-project/pull/141411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [CIR] Upstream ShuffleDynamicOp for VectorType (PR #141411)

2025-05-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/141411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream ShuffleDynamicOp for VectorType (PR #141411)

2025-05-28 Thread Andy Kaylor via cfe-commits
@@ -1871,6 +1872,54 @@ mlir::LogicalResult CIRToLLVMVecCmpOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMVecShuffleDynamicOpLowering::matchAndRewrite( +cir::VecShuffleDynamicOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewr

[clang] [CIR] Upstream ShuffleDynamicOp for VectorType (PR #141411)

2025-05-28 Thread Andy Kaylor via cfe-commits
@@ -2141,4 +2141,37 @@ def VecCmpOp : CIR_Op<"vec.cmp", [Pure, SameTypeOperands]> { }]; } +//===--===// +// VecShuffleDynamicOp +//===--==

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-05-28 Thread Amr Hesham via cfe-commits
@@ -577,12 +577,31 @@ mlir::Attribute ConstantEmitter::tryEmitPrivate(const APValue &value, case APValue::Union: cgm.errorNYI("ConstExprEmitter::tryEmitPrivate struct or union"); return {}; - case APValue::FixedPoint: case APValue::ComplexInt: - case APValue::Co

[clang] [ItaniumMangle] Make sure class types are added to the dictionary of substitution candidates when compiling for older ABIs (PR #138947)

2025-05-28 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/138947 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b035580 - [ItaniumMangle] Make sure class types are added to the dictionary of substitution candidates when compiling for older ABIs (#138947)

2025-05-28 Thread via cfe-commits
Author: Akira Hatanaka Date: 2025-05-28T11:49:40-07:00 New Revision: b03558080eda9ebe3955afdd52aed902c5087310 URL: https://github.com/llvm/llvm-project/commit/b03558080eda9ebe3955afdd52aed902c5087310 DIFF: https://github.com/llvm/llvm-project/commit/b03558080eda9ebe3955afdd52aed902c5087310.diff

[clang] [clang-format] Handle .h files for LK_C and LK_ObjC (PR #141714)

2025-05-28 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/141714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a4b2f4a - Check for unsupported target options even with -Qunused-arguments (#141698)

2025-05-28 Thread via cfe-commits
Author: Matthias Braun Date: 2025-05-28T11:42:47-07:00 New Revision: a4b2f4a72aa9b4655ecc723838830e0a7f29c9ca URL: https://github.com/llvm/llvm-project/commit/a4b2f4a72aa9b4655ecc723838830e0a7f29c9ca DIFF: https://github.com/llvm/llvm-project/commit/a4b2f4a72aa9b4655ecc723838830e0a7f29c9ca.diff

[clang] Check for unsupported target options even with -Qunused-arguments (PR #141698)

2025-05-28 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB closed https://github.com/llvm/llvm-project/pull/141698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ItaniumMangle] Make sure class types are added to the dictionary of substitution candidates when compiling for older ABIs (PR #138947)

2025-05-28 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak edited https://github.com/llvm/llvm-project/pull/138947 ___ 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-28 Thread Richard Smith via cfe-commits
zygoloid wrote: > Its more that we assume/like to assume that the Standard Library always 'does > the right thing', even if it does so in ways that look 'wrong'. So we > suppress warnings in the standard library headers, since they are assumed to > all be false-positives. > > This of course i

[clang] Check for unsupported target options even with -Qunused-arguments (PR #141698)

2025-05-28 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/141698 >From cef4f070167474ac0e8d1eea903974a31ff9934d Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 27 May 2025 18:20:28 -0700 Subject: [PATCH 1/2] Check for unsupported target options even with -Qunused-arg

[clang] [CIR] Upstream ShuffleDynamicOp for VectorType (PR #141411)

2025-05-28 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/141411 >From 12295ee3a5613d7473ab33a4579015a2217617a0 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 25 May 2025 17:21:34 +0200 Subject: [PATCH 1/2] [CIR] Upstream ShuffleDynamicOp for VectorType --- cla

[clang] [CIR] Upstream ShuffleDynamicOp for VectorType (PR #141411)

2025-05-28 Thread Amr Hesham via cfe-commits
@@ -1548,6 +1548,20 @@ OpFoldResult cir::VecExtractOp::fold(FoldAdaptor adaptor) { return elements[index]; } +//===--===// +// VecShuffleDynamicOp +//===-

[clang] [NFCI][ubsan] Precommit tests for -fsanitize-annotate-debug-info (PR #141814)

2025-05-28 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/141814 >From 04f6229593a5891025d4ac240b3b5b15535a1e25 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 28 May 2025 17:55:46 + Subject: [PATCH 1/3] [NFCI][ubsan] Precommit tests for -fsanitize-annotate-deb

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

2025-05-28 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane the question of whether `S s{}; s.f = ...;` should be deemed as a > relaxation of `S s{.f = ...};` came up during the initial RFC. From memory, > the conclusion was that it's something we could relax in a v2 of the RFC, but > it is a _significant_ amount of work

[clang] [CIR] Allow use different Int types together in Vec Shift Op (PR #141111)

2025-05-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/14 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Docs] Explicitly document libclang ABI and API stability (PR #141657)

2025-05-28 Thread Vlad Serebrennikov via cfe-commits
@@ -373,19 +373,21 @@ implementation of the facilities by Clang may change behavior as bugs are fixed, features get implemented, etc. The library should be ABI and API stable over time, but ABI- and API-breaking -changes can happen in the following situations: +changes can ha

[clang] [NFCI][ubsan] Precommit tests for -fsanitize-annotate-debug-info (PR #141814)

2025-05-28 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/141814 >From 04f6229593a5891025d4ac240b3b5b15535a1e25 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 28 May 2025 17:55:46 + Subject: [PATCH 1/4] [NFCI][ubsan] Precommit tests for -fsanitize-annotate-deb

[clang] [llvm] Reland "Add macro to suppress -Wunnecessary-virtual-specifier" (PR #141091)

2025-05-28 Thread Nico Weber via cfe-commits
@@ -710,4 +710,28 @@ void AnnotateIgnoreWritesEnd(const char *file, int line); #define LLVM_PREFERRED_TYPE(T) #endif +/// \macro LLVM_VIRTUAL_ANCHOR_FUNCTION +/// This macro is used to adhere to LLVM's policy that each class with a vtable +/// must have at least one out-of-lin

[clang] 6e5f9bb - [CIR] Allow use different Int types together in Vec Shift Op (#141111)

2025-05-28 Thread via cfe-commits
Author: Amr Hesham Date: 2025-05-28T20:16:20+02:00 New Revision: 6e5f9bb6939dca085d057d626240bab365807602 URL: https://github.com/llvm/llvm-project/commit/6e5f9bb6939dca085d057d626240bab365807602 DIFF: https://github.com/llvm/llvm-project/commit/6e5f9bb6939dca085d057d626240bab365807602.diff LO

[clang] [Clang][FMV] Stop emitting implicit default version using target_clones. (PR #141808)

2025-05-28 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/141808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFCI][ubsan] Precommit tests for -fsanitize-annotate-debug-info (PR #141814)

2025-05-28 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/141814 These tests will track progress on extending https://github.com/llvm/llvm-project/pull/139809 from CFI to more UBSan checks. >From 04f6229593a5891025d4ac240b3b5b15535a1e25 Mon Sep 17 00:00:00 2001 From: Thurst

[clang] [NFCI][ubsan] Precommit tests for -fsanitize-annotate-debug-info (PR #141814)

2025-05-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Thurston Dang (thurstond) Changes These tests will track progress on extending https://github.com/llvm/llvm-project/pull/139809 from CFI to more UBSan checks. --- Full diff: https://github.com/llvm/llvm-project/pull/141814.diff 2 Files A

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-28 Thread Andy Kaylor via cfe-commits
@@ -1195,6 +1197,93 @@ Address CIRGenFunction::emitArrayToPointerDecay(const Expr *e) { return Address(ptr, addr.getAlignment()); } +/// Emit the operand of a glvalue conditional operator. This is either a glvalue +/// or a (possibly-parenthesized) throw-expression. If thi

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-28 Thread Andy Kaylor via cfe-commits
@@ -1195,6 +1197,93 @@ Address CIRGenFunction::emitArrayToPointerDecay(const Expr *e) { return Address(ptr, addr.getAlignment()); } +/// Emit the operand of a glvalue conditional operator. This is either a glvalue +/// or a (possibly-parenthesized) throw-expression. If thi

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-28 Thread Andy Kaylor via cfe-commits
@@ -540,3 +540,171 @@ void long_shift_example(long long a, short b) { // OGCG: store i64 %[[SHL]], ptr %[[X]] // OGCG: ret void + +void b1(bool a, bool b) { + bool x = a && b; + x = x || b; +} + +// CIR-LABEL: cir.func @_Z2b1bb( +// CIR-SAME: %[[ARG0:.*]]: !c

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-28 Thread Andy Kaylor via cfe-commits
@@ -108,6 +108,152 @@ class CIRGenFunction : public CIRGenTypeCache { mlir::MLIRContext &getMLIRContext() { return cgm.getMLIRContext(); } + // - + // Opaque value handling + // - + + /// Keeps track of the current set of opaque v

[clang] [RISCV] Implement intrinsics for XAndesVDot (PR #141441)

2025-05-28 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/141441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-28 Thread Andy Kaylor via cfe-commits
@@ -306,6 +306,24 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return createBinop(loc, lhs, cir::BinOpKind::Or, rhs); } + mlir::Value createSelect(mlir::Location loc, mlir::Value condition, + mlir::Value trueValue, mlir::Value falseValu

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-28 Thread Andy Kaylor via cfe-commits
@@ -1394,13 +1501,84 @@ mlir::Value CIRGenFunction::createDummyValue(mlir::Location loc, return builder.createDummyValue(loc, t, alignment); } -/// This creates an alloca and inserts it into the entry block if -/// \p insertIntoFnEntryBlock is true, otherwise it inserts it

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: This looks good. My remaining concerns are mostly about dead code. https://github.com/llvm/llvm-project/pull/138156 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-28 Thread Andy Kaylor via cfe-commits
@@ -1799,6 +1870,162 @@ mlir::Value ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( cgf.cgm.UInt64Ty, e->EvaluateKnownConstInt(cgf.getContext(; } +/// Return true if the specified expression is cheap enough and side-effect-free +/// enough to evaluate un

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-28 Thread Andy Kaylor via cfe-commits
@@ -201,6 +201,20 @@ bool CIRGenFunction::constantFoldsToSimpleInteger(const Expr *cond, return true; } +/// If the specified expression does not fold +/// to a constant, or if it does but contains a label, return false. If it +/// constant folds return true and set the bo

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/138156 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFCI][ubsan] Precommit tests for -fsanitize-annotate-debug-info (PR #141814)

2025-05-28 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/141814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFCI][ubsan] Precommit tests for -fsanitize-annotate-debug-info (PR #141814)

2025-05-28 Thread Vitaly Buka via cfe-commits
@@ -0,0 +1,74 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -emit-llvm -triple x86_64 -std=c17 -fsanitize=function %s -o - \ vitalybuka wrote: -O1 or -O2 to reduce the bloat? https:/

[clang] [CIR] Defer declarations and tentative definitions (PR #141700)

2025-05-28 Thread Andy Kaylor via cfe-commits
@@ -135,6 +135,10 @@ class CIRGenConsumer : public clang::ASTConsumer { } } } + + void CompleteTentativeDefinition(VarDecl *D) override { +Gen->CompleteTentativeDefinition(D); + } andykaylor wrote: We're using clang naming style in this file ba

[clang] [llvm] Reland "Add macro to suppress -Wunnecessary-virtual-specifier" (PR #141091)

2025-05-28 Thread Nico Weber via cfe-commits
@@ -710,4 +710,28 @@ void AnnotateIgnoreWritesEnd(const char *file, int line); #define LLVM_PREFERRED_TYPE(T) #endif +/// \macro LLVM_VIRTUAL_ANCHOR_FUNCTION +/// This macro is used to adhere to LLVM's policy that each class with a vtable +/// must have at least one out-of-lin

[clang] [llvm] Non constant size and offset in DWARF (PR #141106)

2025-05-28 Thread Tom Tromey via cfe-commits
tromey wrote: I rebased this and fixed up the mlir problem. I also changed how the overload resolution was done, so that a later patch that treats `nullptr` specially can be done without affecting existing call sites. https://github.com/llvm/llvm-project/pull/141106 __

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-28 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko created https://github.com/llvm/llvm-project/pull/141830 - Uses getIIntegerAttr builder method instead of explicit attribute and its type creation. - Adds few helper functions `getAlignmentAttr` to build alignment representing mlir::IntegerAttr. - Removes duplicit typ

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-28 Thread Henrich Lauko via cfe-commits
xlauko wrote: * **#141830** https://app.graphite.dev/github/pr/llvm/llvm-project/141830?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/14183

[clang] [clang] Rename -Wdeprecated-switch-case to -Wdeprecated-declarations-switch-case (PR #141779)

2025-05-28 Thread Nico Weber via cfe-commits
nico wrote: The release notes here https://github.com/llvm/llvm-project/pull/138562/files#diff-ec770381d76c859f5f572db789175fe44410a72608f58ad5dbb14335ba56eb97R525 need updating too, right? https://github.com/llvm/llvm-project/pull/141779 ___ cfe-com

[clang] [clang] Rename -Wdeprecated-switch-case to -Wdeprecated-declarations-switch-case (PR #141779)

2025-05-28 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem updated https://github.com/llvm/llvm-project/pull/141779 >From ca8e6ce98db72d3b37a26b59bda5ed4c8b7a6ed5 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Wed, 28 May 2025 16:35:16 +0200 Subject: [PATCH 1/2] [clang] Rename -Wdeprecated-switch-case to -Wdeprecated-decl

[clang] [clang] Rename -Wdeprecated-switch-case to -Wdeprecated-declarations-switch-case (PR #141779)

2025-05-28 Thread Hans Wennborg via cfe-commits
zmodem wrote: Thanks! Ironically, ReleaseNotes.rst is where I started my patch, but I forgot to actually update it :) https://github.com/llvm/llvm-project/pull/141779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [Modules] Don't fail when an unused textual header is missing. (PR #138227)

2025-05-28 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: > Can you clarify, are you saying this pattern of having a header in two > different modules has to keep working indefinitely, or are you willing to > migrate off of it? > I don't understand what the reason is for the header to be in two different > modules in the first pl

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

2025-05-28 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,9 @@ +; RUN: mlir-translate -import-llvm -split-input-file %s | FileCheck %s + +; CHECK-LABEL: llvm.func @prefer_vector_width() +; CHECK: prefer_vector_width = "128" tarunprabhu wrote: Should this be `CHECK-SAME`? I assume that you intend to match `pr

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

2025-05-28 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,9 @@ +; RUN: mlir-translate -import-llvm -split-input-file %s | FileCheck %s + +; CHECK-LABEL: llvm.func @prefer_vector_width() +; CHECK: prefer_vector_width = "128" tarunprabhu wrote: Oh, does `CHECK-LABEL` allow one to continue checking on the same l

[libclc] [libclc] Move vload & vstore to CLC library (PR #141755)

2025-05-28 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/141755 This commit moves the various vload and vstore builtins (including vload_half, vloada_half, etc.) to the CLC library. This is almost entirely a code move and does not make any attempt to clean up or optimi

[clang-tools-extra] 11e804f - [clang-doc] Fix build break with BUILD_SHARED_LIBS=ON

2025-05-28 Thread Krzysztof Parzyszek via cfe-commits
Author: Krzysztof Parzyszek Date: 2025-05-28T08:13:31-05:00 New Revision: 11e804fcabce11a9fdfb4033263ef1e502cc8a72 URL: https://github.com/llvm/llvm-project/commit/11e804fcabce11a9fdfb4033263ef1e502cc8a72 DIFF: https://github.com/llvm/llvm-project/commit/11e804fcabce11a9fdfb4033263ef1e502cc8a72

[clang] [clang] Implement address sanitizer on AIX (PR #129925)

2025-05-28 Thread David Tenty via cfe-commits
@@ -259,6 +260,45 @@ void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, // Specify linker input file(s). AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA); + // Add sanitizer libraries. + const SanitizerArgs &Sanitize = ToolChain.getSanitizerArgs(Ar

[clang] [clang] Implement address sanitizer on AIX (PR #129925)

2025-05-28 Thread David Tenty via cfe-commits
@@ -259,6 +260,45 @@ void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, // Specify linker input file(s). AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA); + // Add sanitizer libraries. + const SanitizerArgs &Sanitize = ToolChain.getSanitizerArgs(Ar

[clang] [C] Fix parsing of [[clang::assume]] (PR #141747)

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

[clang] [Docs] Explicitly document libclang ABI and API stability (PR #141657)

2025-05-28 Thread Vlad Serebrennikov via cfe-commits
@@ -373,19 +373,21 @@ implementation of the facilities by Clang may change behavior as bugs are fixed, features get implemented, etc. The library should be ABI and API stable over time, but ABI- and API-breaking -changes can happen in the following situations: +changes can ha

[clang] [C23] Handle type compatibility of unnamed records (PR #141783)

2025-05-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes At the top-level, both types need to have a tag in order for them to be compatible within the same TU in C23. An unnamed structure has no tag, so it cannot be compatible with another type within the TU

[clang] [C23] Handle type compatibility of unnamed records (PR #141783)

2025-05-28 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/141783 At the top-level, both types need to have a tag in order for them to be compatible within the same TU in C23. An unnamed structure has no tag, so it cannot be compatible with another type within the TU. F

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

2025-05-28 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I'll need to look into that - maybe we can talk offline. Since `libclc` is > used by downstream toolchains I feel it'll be hard to significantly change > how it's built or presented to the host. We could support two methods of > building but that would get sticky pretty quickl

[clang] [C23] Handle type compatibility of unnamed records (PR #141783)

2025-05-28 Thread Erich Keane via cfe-commits
@@ -1751,9 +1751,20 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, // fulfill the preceding requirements. ... Otherwise, the structure, union, // or enumerated types are incompatible. - if (!NameIsStructurallyEquivalent(*D1, *D2)) { + //

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

2025-05-28 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] [llvm] [UBSan] Support src:*=sanitize for multiple ignorelists. (PR #141640)

2025-05-28 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao updated https://github.com/llvm/llvm-project/pull/141640 >From d858fbe3ce415fda7d43d4e99c5a94646174b965 Mon Sep 17 00:00:00 2001 From: Qinkun Bao Date: Tue, 27 May 2025 17:32:30 + Subject: [PATCH 1/8] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?UT

[clang] [Clang] Optimize some `getBeginLoc` implementations (PR #141058)

2025-05-28 Thread Erich Keane via cfe-commits
@@ -2901,34 +2907,44 @@ class CallExpr : public Expr { // // * An optional of type FPOptionsOverride. // - // Note that we store the offset in bytes from the this pointer to the start - // of the trailing objects. It would be perfectly possible to compute it - // based

[clang] [Clang] Optimize some `getBeginLoc` implementations (PR #141058)

2025-05-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 1 request for a static-assert, else LGTM. https://github.com/llvm/llvm-project/pull/141058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [Clang] Optimize some `getBeginLoc` implementations (PR #141058)

2025-05-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/141058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5e28af0 - [C] Fix parsing of [[clang::assume]] (#141747)

2025-05-28 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-05-28T10:07:14-04:00 New Revision: 5e28af04f32455f93975e227d08f502faa45247c URL: https://github.com/llvm/llvm-project/commit/5e28af04f32455f93975e227d08f502faa45247c DIFF: https://github.com/llvm/llvm-project/commit/5e28af04f32455f93975e227d08f502faa45247c.diff

[clang] [C] Fix parsing of [[clang::assume]] (PR #141747)

2025-05-28 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/141747 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Reset ArgPackSubstIndex before rewriting CTAD template parameters (PR #141741)

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

[clang] [Clang] Reset ArgPackSubstIndex before rewriting CTAD template parameters (PR #141741)

2025-05-28 Thread Erich Keane via cfe-commits
@@ -1099,6 +1099,10 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef, // parameters, used for building `TemplateArgsForBuildingFPrime`. SmallVector TransformedDeducedAliasArgs( AliasTemplate->getTemplateParameters()->size()); + // We might be already within a pack ex

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

2025-05-28 Thread via cfe-commits
Author: Rajveer Singh Bharadwaj Date: 2025-05-28T07:10:55-07:00 New Revision: 59a5c1f25f578bb1a4951a4610b4e683ee94a870 URL: https://github.com/llvm/llvm-project/commit/59a5c1f25f578bb1a4951a4610b4e683ee94a870 DIFF: https://github.com/llvm/llvm-project/commit/59a5c1f25f578bb1a4951a4610b4e683ee94

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

2025-05-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/139859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-05-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. LGTM! I'll merge this for you, as I believe you dont' have commit rights. https://github.com/llvm/llvm-project/pull/139859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [clang][Sema] Declare builtins used in #pragma intrinsic (PR #138205)

2025-05-28 Thread Nick Sarnie via cfe-commits
sarnex wrote: Investigating, thanks. https://github.com/llvm/llvm-project/pull/138205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Trying to fix undefined symbol error caused by iterator variable (PR #141507)

2025-05-28 Thread via cfe-commits
https://github.com/ShashwathiNavada updated https://github.com/llvm/llvm-project/pull/141507 >From 435206a8beb2af0368757bd1cf0850db30088ca5 Mon Sep 17 00:00:00 2001 From: Shashwathi N Date: Mon, 19 May 2025 14:29:47 -0500 Subject: [PATCH 1/5] Trying to fix undefined symbol error caused by itera

[clang] [llvm] [UBSan] Support src:*=sanitize for multiple ignorelists. (PR #141640)

2025-05-28 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao updated https://github.com/llvm/llvm-project/pull/141640 >From d858fbe3ce415fda7d43d4e99c5a94646174b965 Mon Sep 17 00:00:00 2001 From: Qinkun Bao Date: Tue, 27 May 2025 17:32:30 + Subject: [PATCH 1/8] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?UT

[clang] [llvm] Enable WPD without lto (PR #141777)

2025-05-28 Thread Hassnaa Hamdi via cfe-commits
https://github.com/hassnaaHamdi created https://github.com/llvm/llvm-project/pull/141777 None >From 702f64a84914d2fe467a12babd99338f2215d425 Mon Sep 17 00:00:00 2001 From: Hassnaa Hamdi Date: Wed, 28 May 2025 14:27:34 + Subject: [PATCH] Enable WPD without lto --- clang/lib/CodeGen/CGVTab

[clang] [clang] Rename -Wdeprecated-switch-case to -Wdeprecated-declarations-switch-case (PR #141779)

2025-05-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Hans Wennborg (zmodem) Changes To make it more clear that it's a subset of -Wdeprecated-declarations. Follow-up to #138562 --- Full diff: https://github.com/llvm/llvm-project/pull/141779.diff 3 Files Affected: - (modified) clang/includ

[clang] [clang] Rename -Wdeprecated-switch-case to -Wdeprecated-declarations-switch-case (PR #141779)

2025-05-28 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem created https://github.com/llvm/llvm-project/pull/141779 To make it more clear that it's a subset of -Wdeprecated-declarations. Follow-up to #138562 >From ca8e6ce98db72d3b37a26b59bda5ed4c8b7a6ed5 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Wed, 28 May 2025 16:

[clang] [llvm] Enable WPD without lto (PR #141777)

2025-05-28 Thread Hassnaa Hamdi via cfe-commits
https://github.com/hassnaaHamdi edited https://github.com/llvm/llvm-project/pull/141777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-05-28 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,9 @@ +; RUN: mlir-translate -import-llvm -split-input-file %s | FileCheck %s + +; CHECK-LABEL: llvm.func @prefer_vector_width() +; CHECK: prefer_vector_width = "128" tarunprabhu wrote: Thanks for the update and clarification. https://github.com/llvm/l

[clang-tools-extra] [clang-tidy] Added Conflicting Global Accesses checker (PR #130421)

2025-05-28 Thread Áron Hárnási via cfe-commits
https://github.com/ConcreteCactus updated https://github.com/llvm/llvm-project/pull/130421 From 0196b1ba87f5966d5200d3712e75587802d568f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ron=20H=C3=A1rn=C3=A1si?= Date: Fri, 22 Nov 2024 21:43:04 +0100 Subject: [PATCH] [clang-tidy] Added Conflicting

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

2025-05-28 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Thanks for the all the changes. LGTM. https://github.com/llvm/llvm-project/pull/141380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [C23] Handle type compatibility of unnamed records (PR #141783)

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

[clang] [llvm] [DirectX] Gather resource names in DXIL resource analysis (PR #140633)

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

[clang] [llvm] Enable WPD without lto (PR #141777)

2025-05-28 Thread Hassnaa Hamdi via cfe-commits
https://github.com/hassnaaHamdi edited https://github.com/llvm/llvm-project/pull/141777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Handle type compatibility of unnamed records (PR #141783)

2025-05-28 Thread Erich Keane via cfe-commits
@@ -359,3 +359,35 @@ struct alignment { // c17-error {{redefinition of 'alignment'}} \ c23-error {{type 'struct alignment' has a member with an attribute which currently causes the types to be treated as though they are incompatible}} int x; }; + +//

[clang] [Module] Prefer precompiled module even when header is private (PR #141792)

2025-05-28 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov created https://github.com/llvm/llvm-project/pull/141792 Currently, Clang picks a module where the header is non-private even when the header is textual and the other is modular. This change makes it prefer a module where the header is modular instead. Access c

[clang] [llvm] Enable WPD without lto (PR #141777)

2025-05-28 Thread Hassnaa Hamdi via cfe-commits
https://github.com/hassnaaHamdi edited https://github.com/llvm/llvm-project/pull/141777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Module] Prefer precompiled module even when header is private (PR #141792)

2025-05-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ilya Biryukov (ilya-biryukov) Changes Currently, Clang picks a module where the header is non-private even when the header is textual and the other is modular. This change makes it prefer a module where the header is modular instead. Acce

[clang] [Module] Prefer precompiled module even when header is private (PR #141792)

2025-05-28 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: This change will fix the breakages we've had internally with #138227, unblocking it. https://github.com/llvm/llvm-project/pull/141792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

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

2025-05-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64-aix` running on `aix-ppc64` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/3884 Here is the relevant piece

[clang] [llvm] Enable WPD without lto (PR #141777)

2025-05-28 Thread Hassnaa Hamdi via cfe-commits
https://github.com/hassnaaHamdi edited https://github.com/llvm/llvm-project/pull/141777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-05-28 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt closed https://github.com/llvm/llvm-project/pull/141086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-05-28 Thread Jamie Schmeiser via cfe-commits
jamieschmeiser wrote: The correct way to enable support for -F is to specify `--target=`, eg `--target=x86_64-apple-macos`. According to https://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html, -F is a darwin extension in g++ so it only makes sense for darwin in clang. Currently, it is quietl

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

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

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

2025-05-28 Thread Oleksandr T. via cfe-commits
@@ -672,12 +672,13 @@ static Attr *ProcessStmtAttribute(Sema &S, Stmt *St, const ParsedAttr &A, !(A.existsInTarget(S.Context.getTargetInfo()) || (S.Context.getLangOpts().SYCLIsDevice && Aux && A.existsInTarget(*Aux { -S.Diag(A.getLoc(), A.isRegul

[clang] [ASTWriter] Do not write ObjCCategories if empty. (PR #141841)

2025-05-28 Thread David Green via cfe-commits
https://github.com/davemgreen created https://github.com/llvm/llvm-project/pull/141841 This is a fix for a completely unrelated patch, that started to cause failures in the explicit-build.cpp test because the size of the b.pcm and b-not-a.pcm files became the same. The alignment added by empty

[clang] [ASTWriter] Do not write ObjCCategories if empty. (PR #141841)

2025-05-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: David Green (davemgreen) Changes This is a fix for a completely unrelated patch, that started to cause failures in the explicit-build.cpp test because the size of the b.pcm and b-not-a.pcm files became the same. The alignment adde

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

2025-05-28 Thread via cfe-commits
Author: Ashley Coleman Date: 2025-05-28T13:58:47-06:00 New Revision: cb7f4ff03cc20b04360d75f78e2255214a617d5f URL: https://github.com/llvm/llvm-project/commit/cb7f4ff03cc20b04360d75f78e2255214a617d5f DIFF: https://github.com/llvm/llvm-project/commit/cb7f4ff03cc20b04360d75f78e2255214a617d5f.diff

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

2025-05-28 Thread Ashley Coleman via cfe-commits
V-FEXrt wrote: Tracking bug! https://github.com/llvm/llvm-project/issues/141842 https://github.com/llvm/llvm-project/pull/141086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-05-28 Thread Oleksandr T. via cfe-commits
@@ -1842,8 +1842,7 @@ void Parser::ProhibitCXX11Attributes(ParsedAttributes &Attrs, continue; if (AL.getKind() == ParsedAttr::UnknownAttribute) { if (WarnOnUnknownAttrs) -Diag(AL.getLoc(), diag::warn_unknown_attribute_ignored) -<< AL << AL.g

<    1   2   3   4   5   >