[clang] 4b0df28 - [clang][Tooling] Prefer for atomic_* family in C++

2025-01-23 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2025-01-23T10:06:33+01:00 New Revision: 4b0df28a68a4ed4ec5829fb4d8722a0e701d1796 URL: https://github.com/llvm/llvm-project/commit/4b0df28a68a4ed4ec5829fb4d8722a0e701d1796 DIFF: https://github.com/llvm/llvm-project/commit/4b0df28a68a4ed4ec5829fb4d8722a0e701d1796.dif

[clang] [Arm] Fix generating code with UB in NeonEmitter (PR #121802)

2025-01-23 Thread via cfe-commits
https://github.com/CarolineConcatto approved this pull request. https://github.com/llvm/llvm-project/pull/121802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Clang] Make `-Wreturn-type` default to an error in all language modes (PR #123470)

2025-01-23 Thread via cfe-commits
Sirraide wrote: > I see a lot of diagnostics were updated to `DefaultError` but I don't see > matching tests that demonstrate the now error. We should be testing each > diagnostic. #123464 also added `-Werror=return-type` to some tests; we can remove those now, which should cover at least som

[clang] [compiler-rt] [Clang] Make `-Wreturn-type` default to an error in all language modes (PR #123470)

2025-01-23 Thread via cfe-commits
Sirraide wrote: > I think this is probably Clang 21 material Yeah, probably https://github.com/llvm/llvm-project/pull/123470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] -fno-plt: warn for unsupported targets (PR #124081)

2025-01-23 Thread Martin Storsjö via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang -### -c --target=aarch64 -fno-plt -Werror %s 2>&1 | FileCheck %s +// RUN: %clang -### -c --target=x86_64 -fno-plt -Werror %s 2>&1 | FileCheck %s +// RUN: %clang -### -c --target=aarch64 -fno-plt -fplt -Werror %s 2>&1 | FileCheck %s --check-prefix=N

[clang] 17756aa - [Clang] [Release Notes] Implicit lifetimes are a C++23 feature

2025-01-23 Thread via cfe-commits
Author: cor3ntin Date: 2025-01-23T12:19:52+01:00 New Revision: 17756aa9c9d2f54a29dba3a2805f217cc1723ff0 URL: https://github.com/llvm/llvm-project/commit/17756aa9c9d2f54a29dba3a2805f217cc1723ff0 DIFF: https://github.com/llvm/llvm-project/commit/17756aa9c9d2f54a29dba3a2805f217cc1723ff0.diff LOG:

[clang] [llvm] [polly] [NFC][DebugInfo] Use iterator moveBefore at many call-sites (PR #123583)

2025-01-23 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -242,13 +253,19 @@ class Instruction : public User, /// \pre I is a valid iterator into BB. void moveBefore(BasicBlock &BB, InstListType::iterator I); - /// (See other overload for moveBeforePreserving). void moveBeforePreserving(BasicBlock &BB, InstListType::iterat

[clang] [llvm] [polly] [NFC][DebugInfo] Use iterator moveBefore at many call-sites (PR #123583)

2025-01-23 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -224,11 +231,15 @@ class Instruction : public User, /// the basic block that MovePos lives in, right before MovePos. void moveBefore(Instruction *MovePos); + /// Unlink this instruction from its current basic block and insert it into + /// the basic block that MovePos

[clang] [llvm] [polly] [NFC][DebugInfo] Use iterator moveBefore at many call-sites (PR #123583)

2025-01-23 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -448,7 +448,7 @@ void IRPromoter::ExtendSources() { if (isa(V)) I->moveBefore(InsertPt); else -I->moveAfter(InsertPt); +I->moveAfter(&*InsertPt); OCHyams wrote: Same as earlier - is this a code-transition-state bug, or is

[clang] [llvm] [polly] [NFC][DebugInfo] Use iterator moveBefore at many call-sites (PR #123583)

2025-01-23 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams approved this pull request. LGTM with a couple nit/questions. https://github.com/llvm/llvm-project/pull/123583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [llvm] [polly] [NFC][DebugInfo] Use iterator moveBefore at many call-sites (PR #123583)

2025-01-23 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -8890,21 +8890,21 @@ bool CodeGenPrepare::fixupDbgVariableRecord(DbgVariableRecord &DVR) { return AnyChange; } -static void DbgInserterHelper(DbgValueInst *DVI, Instruction *VI) { +static void DbgInserterHelper(DbgValueInst *DVI, BasicBlock::iterator VI) { DVI->remove

[clang] [llvm] [polly] [NFC][DebugInfo] Use iterator moveBefore at many call-sites (PR #123583)

2025-01-23 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams edited https://github.com/llvm/llvm-project/pull/123583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [polly] [NFC][DebugInfo] Use iterator moveBefore at many call-sites (PR #123583)

2025-01-23 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -224,11 +231,15 @@ class Instruction : public User, /// the basic block that MovePos lives in, right before MovePos. void moveBefore(Instruction *MovePos); + /// Unlink this instruction from its current basic block and insert it into + /// the basic block that MovePos

[clang] [llvm] [polly] [NFC][DebugInfo] Use iterator moveBefore at many call-sites (PR #123583)

2025-01-23 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -224,11 +231,15 @@ class Instruction : public User, /// the basic block that MovePos lives in, right before MovePos. void moveBefore(Instruction *MovePos); + /// Unlink this instruction from its current basic block and insert it into + /// the basic block that MovePos

[clang-tools-extra] [clang-tidy] Fix modernize-use-integer-sign-comparison comparison (PR #121506)

2025-01-23 Thread via cfe-commits
https://github.com/qt-tatiana updated https://github.com/llvm/llvm-project/pull/121506 >From 0591e8b7be49299e2b73634a6ad4f2330557b37a Mon Sep 17 00:00:00 2001 From: Tatiana Borisova Date: Thu, 2 Jan 2025 18:08:26 +0100 Subject: [PATCH 1/4] [clang-tidy] Fix modernize-use-integer-sign-comparison

[clang] [Driver] -fno-plt: warn for unsupported targets (PR #124081)

2025-01-23 Thread via cfe-commits
https://github.com/Martchus approved this pull request. https://github.com/llvm/llvm-project/pull/124081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" linking. (PR #123922)

2025-01-23 Thread Amit Kumar Pandey via cfe-commits
@@ -70,6 +70,10 @@ def err_drv_no_rocm_device_lib : Error< "cannot find ROCm device library%select{| for %1| for ABI version %1}0; provide its path via " "'--rocm-path' or '--rocm-device-lib-path', or pass '-nogpulib' to build " "without ROCm device library">; +def err_d

[clang] [Driver] -fno-plt: warn for unsupported targets (PR #124081)

2025-01-23 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo approved this pull request. LGTM, thanks! This seems to nicely fix the issue and make the situation clearer. CC @Martchus. https://github.com/llvm/llvm-project/pull/124081 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)

2025-01-23 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/123736 >From 586dd4edfc79c88cc1583b64d186c1481fbd6ce1 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Wed, 4 Sep 2024 13:31:39 +0200 Subject: [PATCH] [Clang] Add BuiltinTemplates.td to generate code for builtin

[clang] [C++20][Modules] Fix crash/compiler error due broken AST links (PR #123648)

2025-01-23 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/123648 >From e5cd06ddbc4193f9d5910eba93f0eb309d67063c Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Mon, 20 Jan 2025 09:03:25 -0800 Subject: [PATCH 1/7] [C++20][Modules] Fix crash/compiler error due broken AS

[clang] [flang] [llvm] [Clang] Remove ARCMigrate (PR #119269)

2025-01-23 Thread via cfe-commits
cor3ntin wrote: @AaronBallman https://github.com/llvm/llvm-project/pull/119269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move nextafter to the CLC library (PR #124097)

2025-01-23 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/124097 There were two implementations of this - one that implemented nextafter in software, and another that called a clang builtin. No in-tree targets called the builtin, so all targets build the software version

[libclc] [libclc] Move nextafter to the CLC library (PR #124097)

2025-01-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Fraser Cormack (frasercrmck) Changes There were two implementations of this - one that implemented nextafter in software, and another that called a clang builtin. No in-tree targets called the builtin, so all targets build the so

[clang] [C++20][Modules] Fix crash/compiler error due broken AST links (PR #123648)

2025-01-23 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin closed https://github.com/llvm/llvm-project/pull/123648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TySan] Add initial documentation for Type Sanitizer (PR #123595)

2025-01-23 Thread via cfe-commits
@@ -0,0 +1,162 @@ + +TypeSanitizer + + +.. contents:: + :local: + +Introduction + + +The TypeSanitizer is a detector for strict type aliasing violations. It consists of a compiler +instrumentation module and a run-time library. C/C++

[clang] [TySan] Add initial documentation for Type Sanitizer (PR #123595)

2025-01-23 Thread via cfe-commits
https://github.com/gbMattN updated https://github.com/llvm/llvm-project/pull/123595 >From 807c2c8be0517cbb1b9db890f48baeb6f226ba2f Mon Sep 17 00:00:00 2001 From: gbMattN Date: Mon, 20 Jan 2025 11:02:06 + Subject: [PATCH 1/9] [TySan] Add initial documentation --- clang/docs/TypeSanitizer.r

[clang] cad6bba - [C++20][Modules] Fix crash/compiler error due broken AST links (#123648)

2025-01-23 Thread via cfe-commits
Author: Dmitry Polukhin Date: 2025-01-23T10:35:58Z New Revision: cad6bbade0d7dc57b9c43d9ed8c38260345d50bf URL: https://github.com/llvm/llvm-project/commit/cad6bbade0d7dc57b9c43d9ed8c38260345d50bf DIFF: https://github.com/llvm/llvm-project/commit/cad6bbade0d7dc57b9c43d9ed8c38260345d50bf.diff LO

[clang] [llvm] [AArch64] Improve bcvtn2 and remove aarch64_neon_bfcvt intrinsics (PR #120363)

2025-01-23 Thread Sjoerd Meijer via cfe-commits
sjoerdmeijer wrote: Forgot to add that a similar problems occur for another test in that same directory: `vmulh_lane_f16_1.c`. https://github.com/llvm/llvm-project/pull/120363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [TySan] Add initial documentation for Type Sanitizer (PR #123595)

2025-01-23 Thread via cfe-commits
@@ -0,0 +1,162 @@ + +TypeSanitizer + + +.. contents:: + :local: + +Introduction + + +The TypeSanitizer is a detector for strict type aliasing violations. It consists of a compiler +instrumentation module and a run-time library. C/C++

[clang] [TySan] Add initial documentation for Type Sanitizer (PR #123595)

2025-01-23 Thread via cfe-commits
https://github.com/gbMattN updated https://github.com/llvm/llvm-project/pull/123595 >From 807c2c8be0517cbb1b9db890f48baeb6f226ba2f Mon Sep 17 00:00:00 2001 From: gbMattN Date: Mon, 20 Jan 2025 11:02:06 + Subject: [PATCH 01/10] [TySan] Add initial documentation --- clang/docs/TypeSanitizer

[clang] [llvm] [AArch64] Improve bcvtn2 and remove aarch64_neon_bfcvt intrinsics (PR #120363)

2025-01-23 Thread David Green via cfe-commits
davemgreen wrote: Hi - that sounds like GISel might be miss-compiling it? It doesn't support bf16, so shouldn't be trying to use those instructions for fp16. I can try and take a look. https://github.com/llvm/llvm-project/pull/120363 ___ cfe-commits

[libcxx] [libcxxabi] [libunwind] [llvm] [libc++] Enable -Wmissing-prototypes (PR #116261)

2025-01-23 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116261 >From 60f615f419e09714316678e465c4479bedb88506 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 14 Nov 2024 18:30:39 +0100 Subject: [PATCH] [libc++] Enable -Wmissing-prototypes --- libcxx/include/f

[clang] [Driver] -fno-plt: warn for unsupported targets (PR #124081)

2025-01-23 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo edited https://github.com/llvm/llvm-project/pull/124081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" linking. (PR #123922)

2025-01-23 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 edited https://github.com/llvm/llvm-project/pull/123922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Raise empty.modulemap expected size to <70KB to fix RISC-V failure (PR #123959)

2025-01-23 Thread Alex Bradbury via cfe-commits
https://github.com/asb closed https://github.com/llvm/llvm-project/pull/123959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1930635 - [clang][Modules] Raise empty.modulemap expected size to <70KB to fix RISC-V failure (#123959)

2025-01-23 Thread via cfe-commits
Author: Alex Bradbury Date: 2025-01-23T10:22:07Z New Revision: 19306351a2c45e266fa11b41eb1362b20b6ca56d URL: https://github.com/llvm/llvm-project/commit/19306351a2c45e266fa11b41eb1362b20b6ca56d DIFF: https://github.com/llvm/llvm-project/commit/19306351a2c45e266fa11b41eb1362b20b6ca56d.diff LOG:

[clang] [clang][Modules] Raise empty.modulemap expected size to <70KB to fix RISC-V failure (PR #123959)

2025-01-23 Thread Alex Bradbury via cfe-commits
asb wrote: Thanks, I've gone ahead an merged. Any insight into why the module files may be larger on RISC-V vs other targets greatly appreciated - as I said in https://github.com/llvm/llvm-project/pull/111360 I'm not sure how to best inspect the module files. https://github.com/llvm/llvm-proj

[libclc] [libclc] Move nextafter to the CLC library (PR #124097)

2025-01-23 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/124097 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add -fwrapv-pointer flag (PR #122486)

2025-01-23 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/122486 >From 925f74cad21eb6c46514d1ae543ac202073baf27 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 10 Jan 2025 17:01:07 +0100 Subject: [PATCH] [Clang] Add -fwrapv-pointer flag GCC supports three flags related

[clang] [llvm] [polly] [NFC][DebugInfo] Use iterator moveBefore at many call-sites (PR #123583)

2025-01-23 Thread Jeremy Morse via cfe-commits
@@ -448,7 +448,7 @@ void IRPromoter::ExtendSources() { if (isa(V)) I->moveBefore(InsertPt); else -I->moveAfter(InsertPt); +I->moveAfter(&*InsertPt); jmorse wrote: Good question on this and the other item; I think the most im

[clang] [Clang] use constant evaluation context for constexpr if conditions (PR #123667)

2025-01-23 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/123667 >From 00b8b64879ad3ae35a0a671da563ac876ffaf228 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 20 Jan 2025 22:51:00 +0200 Subject: [PATCH 1/2] [Clang] use constant evaluation context for constexpr if c

[clang] [llvm] [AArch64] Improve bcvtn2 and remove aarch64_neon_bfcvt intrinsics (PR #120363)

2025-01-23 Thread Sjoerd Meijer via cfe-commits
sjoerdmeijer wrote: Hey @davemgreen, we are looking at a runtime failure in a test from the GCC test-suite: `./testsuite/gcc.target/aarch64/advsimd-intrinsics/vfmash_lane_f16_1.c` I think to reproduce this, this will work: clang vfmash_lane_f16_1.c -mcpu=neoverse-v2 -O0 -lm -o ./vfmash_la

[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

2025-01-23 Thread Nikolaos Chatzikonstantinou via cfe-commits
https://github.com/createyourpersonalaccount edited https://github.com/llvm/llvm-project/pull/123926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] 9705500 - [libclc] Move nextafter to the CLC library (#124097)

2025-01-23 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-01-23T12:24:16Z New Revision: 9705500582b9c2b2e1dd6de14f03a94d270a9250 URL: https://github.com/llvm/llvm-project/commit/9705500582b9c2b2e1dd6de14f03a94d270a9250 DIFF: https://github.com/llvm/llvm-project/commit/9705500582b9c2b2e1dd6de14f03a94d270a9250.diff LOG

[libclc] [libclc] Move nextafter to the CLC library (PR #124097)

2025-01-23 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/124097 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] add negative from of -fsave-main-program (PR #124110)

2025-01-23 Thread via cfe-commits
https://github.com/jeanPerier created https://github.com/llvm/llvm-project/pull/124110 Add the `-fno` form for consistency and to make it easy to switch the default for downstream users. >From 28dba56b12b45f8ce82426e2b79165352f549850 Mon Sep 17 00:00:00 2001 From: Jean Perier Date: Thu, 23 Ja

[clang] [flang] [flang][driver] add negative from of -fsave-main-program (PR #124110)

2025-01-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: None (jeanPerier) Changes Add the `-fno` form for consistency and to make it easy to switch the default for downstream users. --- Full diff: https://github.com/llvm/llvm-project/pull/124110.diff 5 Files Affected: - (modified) cl

[clang] [Clang] Add -fwrapv-pointer flag (PR #122486)

2025-01-23 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > Matching gcc's behavior for -f flags both compilers have also makes sense, > IMHO. Agree with this, FWIW. https://github.com/llvm/llvm-project/pull/122486 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [clang-format] Fix a regression in `PointerAlignment: Left` (PR #124085)

2025-01-23 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/124085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

2025-01-23 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. This seems reasonable to me, but wait for the others, maybe @owenca https://github.com/llvm/llvm-project/pull/123926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [z/OS] Add option to target older versions of LE on z/OS (PR #123399)

2025-01-23 Thread Abhina Sree via cfe-commits
@@ -277,6 +277,11 @@ def err_cpu_unsupported_isa def err_arch_unsupported_isa : Error<"architecture '%0' does not support '%1' execution mode">; +def err_zos_target_release_discontinued + : Error<"z/OS target level \"%0\" is discontinued. Unexpected behavior might occur i

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

2025-01-23 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu requested changes to this pull request. Please move code to be shared between `clang` and `flang` to `clang/lib/Driver/ToolChains/CommonArgs.cpp` https://github.com/llvm/llvm-project/pull/119718 ___ cfe-commits mailing l

[clang] [z/OS] Add option to target older versions of LE on z/OS (PR #123399)

2025-01-23 Thread Abhina Sree via cfe-commits
https://github.com/abhina-sree approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/123399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] add negative from of -fsave-main-program (PR #124110)

2025-01-23 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. Thanks Jean. Do you need a `bbc` option? https://github.com/llvm/llvm-project/pull/124110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-01-23 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -1533,13 +1535,11 @@ class NonTypeTemplateParmDecl final /// Return the constraint introduced by the placeholder type of this non-type /// template parameter (if any). Expr *getPlaceholderTypeConstraint() const { -return hasPlaceholderTypeConstraint() ? *getTrailin

[clang] [HLSL] cbuffer: Create host layout structs (PR #122820)

2025-01-23 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/122820 >From 71ddb5a2b4cc8a9609410b436e896484401f5e90 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 13 Jan 2025 15:03:12 -0800 Subject: [PATCH 1/7] [HLSL] cbuffer: Create host layout struct and add resource ha

[clang] [HLSL] cbuffer: Create host layout structs (PR #122820)

2025-01-23 Thread Helena Kotas via cfe-commits
@@ -253,12 +257,229 @@ static void validatePackoffset(Sema &S, HLSLBufferDecl *BufDecl) { } } +// Returns true if the array has a zero size = if any of the dimensions is 0 +static bool isZeroSizedArray(const ConstantArrayType *CAT) { + while (CAT && !CAT->isZeroSize()) +

[clang] [HLSL] cbuffer: Create host layout structs (PR #122820)

2025-01-23 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 ffe5cddb68ab84348866b3a3ac727d263b2a44c2 80fc426305ace181d6ad44cf09e5896592b591c7 --e

[clang] [HLSL] cbuffer: Create host layout structs (PR #122820)

2025-01-23 Thread Helena Kotas via cfe-commits
@@ -253,12 +257,229 @@ static void validatePackoffset(Sema &S, HLSLBufferDecl *BufDecl) { } } +// Returns true if the array has a zero size = if any of the dimensions is 0 +static bool isZeroSizedArray(const ConstantArrayType *CAT) { + while (CAT && !CAT->isZeroSize()) +

[clang] [Driver] -fno-plt: warn for unsupported targets (PR #124081)

2025-01-23 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab approved this pull request. https://github.com/llvm/llvm-project/pull/124081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124074)

2025-01-23 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/124074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124076)

2025-01-23 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/124076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Let diagnostics point to std::allocator calls (PR #123744)

2025-01-23 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/123744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-01-23 Thread Erich Keane via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -1533,13 +1535,11 @@ class NonTypeTemplateParmDecl final ///

[clang] [NVPTX] Fix ctor / dtor lowering when NVPTX target is not enabled (PR #124116)

2025-01-23 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr approved this pull request. Fixes a build issue I was hitting in https://github.com/llvm/llvm-project/pull/123673 https://github.com/llvm/llvm-project/pull/124116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [NVPTX] Fix ctor / dtor lowering when NVPTX target is not enabled (PR #124116)

2025-01-23 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Maybe some day we can just make this the default if we ever provide an in-tree way to handle CUDA. https://github.com/llvm/llvm-project/pull/124116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] 0c71fdd - [NVPTX] Fix ctor / dtor lowering when NVPTX target is not enabled (#124116)

2025-01-23 Thread via cfe-commits
Author: Joseph Huber Date: 2025-01-23T08:14:52-06:00 New Revision: 0c71fdd1575b826cbb3c252ee0b15fc84559abec URL: https://github.com/llvm/llvm-project/commit/0c71fdd1575b826cbb3c252ee0b15fc84559abec DIFF: https://github.com/llvm/llvm-project/commit/0c71fdd1575b826cbb3c252ee0b15fc84559abec.diff

[clang] [NVPTX] Fix ctor / dtor lowering when NVPTX target is not enabled (PR #124116)

2025-01-23 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/124116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] __has_builtin should return false for aux triple builtins (PR #121839)

2025-01-23 Thread Nick Sarnie via cfe-commits
@@ -3,7 +3,10 @@ // RUN: %clang_cc1 %s -ffreestanding -fms-extensions -fms-compatibility \ // RUN: -fms-compatibility-version=19.00 -triple x86_64-pc-windows-msvc -emit-llvm -o - // %clang_cc1 %s -ffreestanding -triple x86_64-w64-windows-gnu -fms-extensions -emit-llvm -o - -

[clang] [flang] [flang][driver] add negative from of -fsave-main-program (PR #124110)

2025-01-23 Thread Eugene Epshteyn via cfe-commits
https://github.com/eugeneepshteyn approved this pull request. https://github.com/llvm/llvm-project/pull/124110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland: [clang] unified CWG2398 and P0522 changes; finishes implementation of P3310 (PR #124137)

2025-01-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Can you explain the revert-issue, and what you did to fix it? The github diff > is making REALLY difficult to understand what you did.. If you go on the commit list, you can click on the commit which I pointed out in the OP ([clang] Changes to template argument list checking"

[clang] [Clang] __has_builtin should return false for aux triple builtins (PR #121839)

2025-01-23 Thread Erich Keane via cfe-commits
@@ -3,7 +3,10 @@ // RUN: %clang_cc1 %s -ffreestanding -fms-extensions -fms-compatibility \ // RUN: -fms-compatibility-version=19.00 -triple x86_64-pc-windows-msvc -emit-llvm -o - // %clang_cc1 %s -ffreestanding -triple x86_64-w64-windows-gnu -fms-extensions -emit-llvm -o - -

[clang] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)

2025-01-23 Thread via cfe-commits
@@ -0,0 +1,184 @@ +//=- ClangBuiltinsEmitter.cpp - Generate Clang builtin templates-*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [Clang] Silently ignore unknown warnings in `--warning-suppression-mappings` (PR #124141)

2025-01-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: James Y Knight (jyknight) Changes This allows the same file to be used on multiple Clang versions, without generating output spam. Also disable parsing of the suppressions file in the Driver, where it's not needed. This was previously ca

[clang] [Clang] __has_builtin should return false for aux triple builtins (PR #121839)

2025-01-23 Thread Nick Sarnie via cfe-commits
@@ -3,7 +3,10 @@ // RUN: %clang_cc1 %s -ffreestanding -fms-extensions -fms-compatibility \ // RUN: -fms-compatibility-version=19.00 -triple x86_64-pc-windows-msvc -emit-llvm -o - // %clang_cc1 %s -ffreestanding -triple x86_64-w64-windows-gnu -fms-extensions -emit-llvm -o - -

[clang] [llvm] [RISCV] Support cR Inline Asm Constraint (PR #124174)

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

[clang] [llvm] [RISCV] Support cR Inline Asm Constraint (PR #124174)

2025-01-23 Thread Sam Elliott via cfe-commits
https://github.com/lenary created https://github.com/llvm/llvm-project/pull/124174 This denotes RVC-compatible GPR Pairs, which are used by the Zclsd extension. C API PR: riscv-non-isa/riscv-c-api-doc#102 >From d26d237f6586b879aab96b5f604e2e85156e778f Mon Sep 17 00:00:00 2001 From: Sam Elliott

[clang] [HLSL] cbuffer: Create host layout structs (PR #122820)

2025-01-23 Thread Tex Riddell via cfe-commits
@@ -253,12 +257,229 @@ static void validatePackoffset(Sema &S, HLSLBufferDecl *BufDecl) { } } +// Returns true if the array has a zero size = if any of the dimensions is 0 +static bool isZeroSizedArray(const ConstantArrayType *CAT) { + while (CAT && !CAT->isZeroSize()) +

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2025-01-23 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > > So I take it we decided not to enable it by default in > > > > `-fms-compatibility` mode then? > > > > > > > > > I don't believe it is appropriate to do so. The intent of this warning is > > > to indicate MSVC compatibility issues when building in > > > non-ms-com

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-23 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: I see that this change has already been reverted by @ilya-biryukov , but FYI before this is re-applied: I am seeing crashes from this change if I attempt to bootstrap a build of clang with modules enabled on Darwin. I haven't yet managed to minimize a test case, but compili

[clang] [compiler-rt] [Clang] Make `-Wreturn-type` default to an error in all language modes (PR #123470)

2025-01-23 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > I think this is probably Clang 21 material > > Yeah, probably First off, I really appreciate this patch because (to me) it's not really defensible in 2025 that falling off the end of a function with a non-void return type is anything but an error. So thank you! I do t

[clang] [HLSL] cbuffer: Create host layout structs (PR #122820)

2025-01-23 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/122820 >From 71ddb5a2b4cc8a9609410b436e896484401f5e90 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 13 Jan 2025 15:03:12 -0800 Subject: [PATCH 1/8] [HLSL] cbuffer: Create host layout struct and add resource ha

[clang] [llvm] [AVX10.2] Update convert chapter intrinsic and mnemonics names (PR #123656)

2025-01-23 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/123656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AVX10.2] Update convert chapter intrinsic and mnemonics names (PR #123656)

2025-01-23 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/123656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating angles containing FatArrow (PR #108671)

2025-01-23 Thread Nico Weber via cfe-commits
@@ -243,14 +244,16 @@ class AnnotatingParser { // operator that was misinterpreted because we are parsing template // parameters. // FIXME: This is getting out of hand, write a decent parser. - if (InExpr && !Line.startsWith(tok::kw_template) && + if

[clang] [llvm] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2025-01-23 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,100 @@ +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -fsyntax-only -verify -pedantic %s -DTEST1 +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -fsyntax-only -verify -pedantic %s -DTEST2 +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -fsynta

[clang] [llvm] [X86][AVX10.2-BF16] Update VCOMISBF16 intrinsics and instructions (PR #123307)

2025-01-23 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang updated https://github.com/llvm/llvm-project/pull/123307 >From e2ae76e265178880db7f1ea7c2c67b79ebbd1761 Mon Sep 17 00:00:00 2001 From: "Wang, Phoebe" Date: Fri, 17 Jan 2025 17:07:26 +0800 Subject: [PATCH 1/2] [X86][AVX10.2-BF16] Update VCOMISBF16 intrinsics and in

[clang] 1c28b92 - [Clang] __has_builtin should return false for aux triple builtins (#121839)

2025-01-23 Thread via cfe-commits
Author: Nick Sarnie Date: 2025-01-23T18:25:54Z New Revision: 1c28b9237382b093f477479c993c80181922ca6a URL: https://github.com/llvm/llvm-project/commit/1c28b9237382b093f477479c993c80181922ca6a DIFF: https://github.com/llvm/llvm-project/commit/1c28b9237382b093f477479c993c80181922ca6a.diff LOG: [

[clang] [Clang] __has_builtin should return false for aux triple builtins (PR #121839)

2025-01-23 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/121839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2025-01-23 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/114062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2025-01-23 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx commented: > There are a still a few places using getTargetAddressSpace(LangAS::Default), > which I don't understand. > > Can you also extract my testcase from #115093? I think this should fix that > issue (also, this absolutely needs to be fixed in the release branc

[clang] [llvm] [clang][DebugInfo] Emit DW_AT_object_pointer on function declarations with explicit `this` (PR #122928)

2025-01-23 Thread Paul T Robinson via cfe-commits
pogo59 wrote: The C API must remain stable and backward compatible. It's the C++ APIs that we are willing to change without worrying. https://github.com/llvm/llvm-project/pull/122928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [HLSL] cbuffer: Create host layout structs (PR #122820)

2025-01-23 Thread Chris B via cfe-commits
@@ -253,12 +257,229 @@ static void validatePackoffset(Sema &S, HLSLBufferDecl *BufDecl) { } } +// Returns true if the array has a zero size = if any of the dimensions is 0 +static bool isZeroSizedArray(const ConstantArrayType *CAT) { + while (CAT && !CAT->isZeroSize()) +

[clang] [llvm] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2025-01-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [lld] [Flang] Don't use FortranDecimal for runtime (PR #121997)

2025-01-23 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/121997 >From a08aa48fb4955f9d16c6172580505c100076b5d4 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 7 Jan 2025 17:05:39 +0100 Subject: [PATCH 1/4] Join FortranDecimal into FortranCommon --- clang/lib/Dri

[clang] [Clang] Fix segmentation fault caused by `VarBypassDetector` stack overflow on deeply nested expressions (PR #124128)

2025-01-23 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb created https://github.com/llvm/llvm-project/pull/124128 This happens when using -O2. Added a test that reproduces it based on a test that was reverted in #111701: https://github.com/bricknerb/llvm-project/blob/93e4a7386ec897e53d7330c6206d38759a858be2/clang/test/Co

[clang] [flang] [flang][driver] add negative from of -fsave-main-program (PR #124110)

2025-01-23 Thread via cfe-commits
https://github.com/jeanPerier updated https://github.com/llvm/llvm-project/pull/124110 >From 28dba56b12b45f8ce82426e2b79165352f549850 Mon Sep 17 00:00:00 2001 From: Jean Perier Date: Thu, 23 Jan 2025 04:37:30 -0800 Subject: [PATCH 1/2] [flang][driver] add negative from of -fsave-main-program -

[clang] [flang] [flang][driver] add negative from of -fsave-main-program (PR #124110)

2025-01-23 Thread via cfe-commits
@@ -6968,8 +6968,8 @@ defm unsigned : OptInFC1FFlag<"unsigned", "Enables UNSIGNED type">; def fno_automatic : Flag<["-"], "fno-automatic">, Group, HelpText<"Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE">; -def fsave_main_progra

[clang] [Clang] Fix segmentation fault caused by `VarBypassDetector` stack overflow on deeply nested expressions (PR #124128)

2025-01-23 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb edited https://github.com/llvm/llvm-project/pull/124128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Remove invalid features from test and autogenerate checks. (PR #124130)

2025-01-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexandros Lamprineas (labrinea) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/124130.diff 1 Files Affected: - (modified) clang/test/CodeGen/AArch64/cpu-supports-target.c (+189-14) ``diff diff --git a/clan

  1   2   3   4   >