[clang] [clang-format] Handle AttributeMacros in parseRecord() (PR #94189)

2025-01-24 Thread Owen Pan via cfe-commits
owenca wrote: > As noted in the issue, I think it should also keep working without the > attribute macro. (I'd be fine with the all upper case is a macro heuristic.) See #124397. https://github.com/llvm/llvm-project/pull/94189 ___ cfe-commits mailing

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/12403 Here is the r

[clang] [clang][bytecode] Fix dummy handling for p2280r4 (PR #124396)

2025-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/124396 This makes some other problems show up like the fact that we didn't suppress diagnostics during __builtin_constant_p evaluation. >From 9abf895d97fe1a5be80e3ae73cd906eb104453fe Mon Sep 17 00:00:00 2001 From: =?

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread via cfe-commits
github-actions[bot] wrote: @BaLiKfromUA Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a bu

[clang] f607e3f - [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (#123533)

2025-01-24 Thread via cfe-commits
Author: Valentyn Yukhymenko Date: 2025-01-25T15:01:40+08:00 New Revision: f607e3fd23ef0019b2f3b289b4d46012400b8db5 URL: https://github.com/llvm/llvm-project/commit/f607e3fd23ef0019b2f3b289b4d46012400b8db5 DIFF: https://github.com/llvm/llvm-project/commit/f607e3fd23ef0019b2f3b289b4d46012400b8db5

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/123533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-24 Thread Younan Zhang via cfe-commits
@@ -977,6 +977,7 @@ Bug Fixes to C++ Support - Fix immediate escalation not propagating through inherited constructors. (#GH112677) - Fixed assertions or false compiler diagnostics in the case of C++ modules for lambda functions or inline friend functions defined inside tem

[clang] [clang][bytecode] Fix dummy handling for p2280r4 (PR #124396)

2025-01-24 Thread via cfe-commits
gsfuds wrote: Impressive work! This change looks like it will significantly improve the project. Excited to see it move forward!https://mtoolshub.com https://github.com/llvm/llvm-project/pull/124396 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [clang-format] Treat uppercase identifiers after struct as macros (PR #124397)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes This restores the behavior before llvmorg-20-init. Fixes #94184. --- Full diff: https://github.com/llvm/llvm-project/pull/124397.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.

[clang] [clang-format] Treat uppercase identifiers after struct as macros (PR #124397)

2025-01-24 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/124397 This restores the behavior before llvmorg-20-init. Fixes #94184. >From e0567ce91a07df1b9a497adb63d5842441855d92 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 24 Jan 2025 22:47:26 -0800 Subject: [PATCH] [cl

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/123533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-24 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/123667 ___ 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-24 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Maybe paragraph or link to a doc about how it works can be useful? Basic understanding of algorithm may help users to avoid false expectations. https://github.com/llvm/llvm-project/pull/123595 ___ cfe-commits mailing list cfe-commits

[clang] [clang][bytecode] Fix dummy handling for p2280r4 (PR #124396)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This makes some other problems show up like the fact that we didn't suppress diagnostics during __builtin_constant_p evaluation. --- Full diff: https://github.com/llvm/llvm-project/pull/124396.diff 8 Files

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-24 Thread Wael Yehia via cfe-commits
@@ -3033,6 +3033,14 @@ indexed format, regardeless whether it is produced by frontend or the IR pass. overhead. ``prefer-atomic`` will be transformed to ``atomic`` when supported by the target, or ``single`` otherwise. +.. option:: -fprofile-continuous w2

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-24 Thread Wael Yehia via cfe-commits
@@ -3033,6 +3033,14 @@ indexed format, regardeless whether it is produced by frontend or the IR pass. overhead. ``prefer-atomic`` will be transformed to ``atomic`` when supported by the target, or ``single`` otherwise. +.. option:: -fprofile-continuous w2

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124391)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Litera

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124391)

2025-01-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/124391 Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Literal migration

[clang] [Index] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124389)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Litera

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

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Litera

[clang] [Index] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124389)

2025-01-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/124389 Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Literal migration

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

2025-01-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/124388 Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Literal migration

[clang] [clang-format] Fix a TableGen crash on comment after l_paren (PR #124380)

2025-01-24 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/124380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a crash on comment after TableGen l_paren (PR #124380)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #124248. --- Full diff: https://github.com/llvm/llvm-project/pull/124380.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+4-6) - (modified) clang/unittests/Format/FormatTe

[clang] [clang-format] Fix a crash on comment after TableGen l_paren (PR #124380)

2025-01-24 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/124380 Fixes #124248. >From 5b45be664597788137686c1b374f362f23e06d78 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 24 Jan 2025 18:07:05 -0800 Subject: [PATCH] [clang-format] Fix a crash on comment after TableGen l

[clang] [clang-format] Fix a bug in annotating overloaded co_await decl (PR #124240)

2025-01-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/12400 Here is the r

[clang] 8e31050 - [clang-format] Fix a bug in annotating overloaded co_await decl (#124240)

2025-01-24 Thread via cfe-commits
Author: Owen Pan Date: 2025-01-24T17:57:04-08:00 New Revision: 8e31050bc2e02d7a3c654def7d7af899ce1cdb1d URL: https://github.com/llvm/llvm-project/commit/8e31050bc2e02d7a3c654def7d7af899ce1cdb1d DIFF: https://github.com/llvm/llvm-project/commit/8e31050bc2e02d7a3c654def7d7af899ce1cdb1d.diff LOG:

[clang] [clang-format] Fix a bug in annotating overloaded co_await decl (PR #124240)

2025-01-24 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/124240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Introduce address space `hlsl_constant(2)` for constant buffer declarations (PR #123411)

2025-01-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-dylib` running on `linaro-flang-aarch64-dylib` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/50/builds/9388 Here is the relevant

[clang-tools-extra] bug fix for pp-trace (PR #124376)

2025-01-24 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] 4ea44eb - [WebAssembly] Fix EH feature flags when compiling multiple files (#124374)

2025-01-24 Thread via cfe-commits
Author: Heejin Ahn Date: 2025-01-24T16:56:26-08:00 New Revision: 4ea44eb1e292369b0b3f2f8ad4680081558f1e01 URL: https://github.com/llvm/llvm-project/commit/4ea44eb1e292369b0b3f2f8ad4680081558f1e01 DIFF: https://github.com/llvm/llvm-project/commit/4ea44eb1e292369b0b3f2f8ad4680081558f1e01.diff LO

[clang] [llvm] [OpenMP] Replace nvvm.annotation usage with kernel calling conventions (PR #122320)

2025-01-24 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean closed https://github.com/llvm/llvm-project/pull/122320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Fix EH feature flags when compiling multiple files (PR #124374)

2025-01-24 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin closed https://github.com/llvm/llvm-project/pull/124374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Introduce address space `hlsl_constant(2)` for constant buffer declarations (PR #123411)

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

[clang] d92bac8 - [HLSL] Introduce address space `hlsl_constant(2)` for constant buffer declarations (#123411)

2025-01-24 Thread via cfe-commits
Author: Helena Kotas Date: 2025-01-24T16:48:35-08:00 New Revision: d92bac8a3ebb19106f6bca6b7613a27c52cb48ab URL: https://github.com/llvm/llvm-project/commit/d92bac8a3ebb19106f6bca6b7613a27c52cb48ab DIFF: https://github.com/llvm/llvm-project/commit/d92bac8a3ebb19106f6bca6b7613a27c52cb48ab.diff

[clang] [WebAssembly] Fix EH feature flags when compiling multiple files (PR #124374)

2025-01-24 Thread Derek Schuff via cfe-commits
https://github.com/dschuff approved this pull request. https://github.com/llvm/llvm-project/pull/124374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] bug fix for pp-trace (PR #124376)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: seekamoon (seekamoon) Changes When using `pp-trace` in practice, I noticed that the YAML files it generated could contain grammar errors, leading to failed parsing. Specifically, it is the `Args` of `MacroExpands`. E.g., ```

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveMax` intrinsic (PR #123428)

2025-01-24 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,143 @@ +; RUN: opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s | FileCheck %s + +; Test that for scalar values, WaveActiveMax maps down to the DirectX op + +define noundef half @wave_active_max_half(half noundef %expr) { +entry: +; CHECK:

[clang-tools-extra] bug fix for pp-trace (PR #124376)

2025-01-24 Thread via cfe-commits
https://github.com/seekamoon created https://github.com/llvm/llvm-project/pull/124376 When using `pp-trace` in practice, I noticed that the YAML files it generated could contain grammar errors, leading to failed parsing. Specifically, it is the `Args` of `MacroExpands`. E.g., ```YAML - Callb

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveMax` intrinsic (PR #123428)

2025-01-24 Thread Adam Yang via cfe-commits
@@ -0,0 +1,143 @@ +; RUN: opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s | FileCheck %s + +; Test that for scalar values, WaveActiveMax maps down to the DirectX op + +define noundef half @wave_active_max_half(half noundef %expr) { +entry: +; CHECK:

[clang] [WebAssembly] Fix EH feature flags when compiling multiple files (PR #124374)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Heejin Ahn (aheejin) Changes #124042 caused a problem that when invoking `clang` with multiple files, the static `HasRun` variables were set when processing the first file so the appropriate feature flags were not added from the second f

[clang] [WebAssembly] Fix EH feature flags when compiling multiple files (PR #124374)

2025-01-24 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/124374 #124042 caused a problem that when invoking `clang` with multiple files, the static `HasRun` variables were set when processing the first file so the appropriate feature flags were not added from the second fi

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveMax` intrinsic (PR #123428)

2025-01-24 Thread Adam Yang via cfe-commits
https://github.com/adam-yang updated https://github.com/llvm/llvm-project/pull/123428 >From 055412fd8d01d796ca070fafeca4375fd442986a Mon Sep 17 00:00:00 2001 From: Adam Yang <31109344+adam-y...@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:14:44 -0800 Subject: [PATCH 1/5] Added WaveActiveM

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveMax` intrinsic (PR #123428)

2025-01-24 Thread Adam Yang via cfe-commits
https://github.com/adam-yang updated https://github.com/llvm/llvm-project/pull/123428 >From 9a0cf138d99ebc9ae18db054b4d8eaa34e8174a8 Mon Sep 17 00:00:00 2001 From: Adam Yang <31109344+adam-y...@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:14:44 -0800 Subject: [PATCH 1/4] Added WaveActiveM

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveMax` intrinsic (PR #123428)

2025-01-24 Thread Adam Yang via cfe-commits
@@ -2132,6 +2135,33 @@ bool SPIRVInstructionSelector::selectWaveActiveCountBits( return Result; } +bool SPIRVInstructionSelector::selectWaveReduceMax(Register ResVReg, + const SPIRVType *ResType, +

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveMax` intrinsic (PR #123428)

2025-01-24 Thread Adam Yang via cfe-commits
@@ -0,0 +1,55 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-vulkan-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-vulkan-unknown %s -o - -filetype=obj | spirv-val %} + +; Test lowering to spir-v backend for various types and scalar/vec

[clang] [clang][Sema] Fix type of an statement expression ending with an atomic type (PR #119711)

2025-01-24 Thread Shafik Yaghmour via cfe-commits
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=, Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=, Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?= Message-ID: In-Reply-To: https://github.com/shafik commented: This looks about right to me but I would like another set of eyes. https://github.com/llv

[clang] [clang][docs] Fix typos concerning wasm __funcref (PR #124365)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timothy Herchen (anematode) Changes The docs conflate `__funcref` with an actual type in a couple places. --- Full diff: https://github.com/llvm/llvm-project/pull/124365.diff 1 Files Affected: - (modified) clang/docs/LanguageExtensions.

[clang] [clang][docs] Fix typos concerning wasm __funcref (PR #124365)

2025-01-24 Thread Timothy Herchen via cfe-commits
https://github.com/anematode created https://github.com/llvm/llvm-project/pull/124365 The docs conflate `__funcref` with an actual type in a couple places. >From 2508da6fd7f38101011573460724f13df1c1616d Mon Sep 17 00:00:00 2001 From: Timothy Herchen Date: Fri, 24 Jan 2025 15:13:30 -0800 Subjec

[clang] [clang][Sema][FMV] Add a note to the 'cannot become multiversioned' diagnostic (PR #124364)

2025-01-24 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/124364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Return larger CXX records in memory (PR #120670)

2025-01-24 Thread Pranav Kant via cfe-commits
pranavk wrote: > Shouldn't this have some sort of Release not maybe under the X86 section? you mean mention this in release section? I plan to add a note in clang/docs/ReleaseNotes.rst. Next week. https://github.com/llvm/llvm-project/pull/120670 ___

[clang] [clang] Fix a use-after-free in expression evaluation (PR #118480)

2025-01-24 Thread Shafik Yaghmour via cfe-commits
shafik wrote: ping, is this still a problem? https://github.com/llvm/llvm-project/pull/118480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema][FMV] Add a note to the 'cannot become multiversioned diagnostic (PR #124364)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jon Roelofs (jroelofs) Changes ... pointing out the previous declaration. --- Full diff: https://github.com/llvm/llvm-project/pull/124364.diff 4 Files Affected: - (modified) clang/lib/Sema/SemaDecl.cpp (+5-2) - (modified) clang/test/Se

[clang] [clang][Sema][FMV] Add a note to the 'cannot become multiversioned diagnostic (PR #124364)

2025-01-24 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs created https://github.com/llvm/llvm-project/pull/124364 ... pointing out the previous declaration. >From 3a2d96d127a3c233f7352acb17ef4a3a6b0a0a0b Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Fri, 24 Jan 2025 15:01:18 -0800 Subject: [PATCH] [clang][Sema][FMV] Ad

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA updated https://github.com/llvm/llvm-project/pull/123533 >From e451a8869420d9240f9006eb2adb599a3e6fd9f8 Mon Sep 17 00:00:00 2001 From: Valentyn Yukhymenko Date: Sun, 19 Jan 2025 23:13:46 + Subject: [PATCH 1/6] [Clang] Reject declaring an alias template with th

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA updated https://github.com/llvm/llvm-project/pull/123533 >From e451a8869420d9240f9006eb2adb599a3e6fd9f8 Mon Sep 17 00:00:00 2001 From: Valentyn Yukhymenko Date: Sun, 19 Jan 2025 23:13:46 + Subject: [PATCH 1/5] [Clang] Reject declaring an alias template with th

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Thorsten Klein via cfe-commits
https://github.com/thorsten-klein updated https://github.com/llvm/llvm-project/pull/124265 >From 15a8d29ef422afe853adeb1fd66e5218d9ebfa34 Mon Sep 17 00:00:00 2001 From: "Klein, Thorsten (GDE-EDSI1)" Date: Fri, 24 Jan 2025 13:46:24 +0100 Subject: [PATCH] added option AllowNoNamespaceComments for

[clang] [Clang] Fix __{add, remove}_pointer in Objective-C++ (PR #123678)

2025-01-24 Thread John McCall via cfe-commits
rjmccall wrote: It's probably right that these should match the behavior of adding or removing a `*` (the latter of which can happen via template argument deduction), which does mean they need to handle ObjC pointer types correctly. https://github.com/llvm/llvm-project/pull/123678

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-24 Thread David Li via cfe-commits
@@ -3033,6 +3033,14 @@ indexed format, regardeless whether it is produced by frontend or the IR pass. overhead. ``prefer-atomic`` will be transformed to ``atomic`` when supported by the target, or ``single`` otherwise. +.. option:: -fprofile-continuous da

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

2025-01-24 Thread John McCall via cfe-commits
@@ -5692,7 +5692,10 @@ CGCallee CodeGenFunction::EmitCallee(const Expr *E) { // Resolve direct calls. } else if (auto DRE = dyn_cast(E)) { if (auto FD = dyn_cast(DRE->getDecl())) { - return EmitDirectCallee(*this, FD); + auto CalleeDecl = FD->hasAttr() +

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Thorsten Klein via cfe-commits
https://github.com/thorsten-klein updated https://github.com/llvm/llvm-project/pull/124265 >From 608ceb0bb475aad65abb55a1dd02bf84d62ec99c Mon Sep 17 00:00:00 2001 From: "Klein, Thorsten (GDE-EDSI1)" Date: Fri, 24 Jan 2025 13:46:24 +0100 Subject: [PATCH] added option AllowNoNamespaceComments for

[clang] [clang] Return larger CXX records in memory (PR #120670)

2025-01-24 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Shouldn't this have some sort of Release not maybe under the X86 section? https://github.com/llvm/llvm-project/pull/120670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

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

2025-01-24 Thread Eli Friedman via cfe-commits
@@ -4311,14 +4311,14 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, // GEP indexes are signed, and scaling an index isn't permitted to // signed-overflow, so we use the same semantics for our explicit // multiply. We suppress this i

[clang] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly (PR #99687)

2025-01-24 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Updated this to be simpler. This logic is *only* run when compiled from `clang --target=amdgcn-amd-amdhsa`, which means it will only show up for OpenCL and direct C++ targeting, HIP uses a different method to get the Toolchain. For regular C++ I do not want to depend on the ROCm

[clang] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly (PR #99687)

2025-01-24 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/99687 >From a6df42bc9a7a9f3779f598f77db45e5334910bc2 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 24 Jan 2025 16:15:57 -0600 Subject: [PATCH] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly S

[clang] [Driver][FreeBSD] Remove FreeBSD/loongarch32 support (PR #122515)

2025-01-24 Thread Brooks Davis via cfe-commits
https://github.com/brooksdavis commented: Retroactive, but LGTM. No need to leave riscv32 around providing a confusing trail for future architectures. https://github.com/llvm/llvm-project/pull/122515 ___ cfe-commits mailing list cfe-commits@lists.llvm

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

2025-01-24 Thread Eli Friedman via cfe-commits
@@ -4311,14 +4311,14 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, // GEP indexes are signed, and scaling an index isn't permitted to // signed-overflow, so we use the same semantics for our explicit // multiply. We suppress this i

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

2025-01-24 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/122486 ___ 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-24 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: CC @llvm/clang-vendors : this changes the behavior of -fwrapv. Internally, I expect it's going to be a bit painful to communicate to all our internal teams that they need to change their -fwrapv usage to -fno-strict-overflow, but if we think it's imp

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
vbvictor wrote: > What do you think about the option's name? Is `AllowNoNamespaceComments` > fine for you or shall I rename to `AllowOmittingNamespaceComments` (or any > other suggestion)? As for now I can not think of a better name, maybe others will suggest. https://github.com/llvm/llvm-

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Wael Yehia (w2yehia) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/124353.diff 6 Files Affected: - (modified) clang/docs/UsersManual.rst (+8) - (modified) clang/include/clang/Basic/CodeGenOptions.def (+1) -

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -39,3 +39,11 @@ Options An unsigned integer specifying the number of spaces before the comment closing a namespace definition. Default is `1U`. + + +.. option:: AllowNoNamespaceComments + + When true, the check will allow that namespace comments are ommitted + ent

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/124313 >From 1d9605013487b8361ff471ef494b4be94bd37470 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sun, 12 Jan 2025 14:45:24 -0300 Subject: [PATCH] [clang] disallow narrowing when matching template template p

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-24 Thread Wael Yehia via cfe-commits
w2yehia wrote: Follow up PR https://github.com/w2yehia/llvm-project/pull/1 to switch all applicable tests in `compiler-rt/test/profile/ContinuousSyncMode` to use `-fprofile-continuous` https://github.com/llvm/llvm-project/pull/124353 ___ cfe-commits

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/123533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: This change looks good to me. https://github.com/llvm/llvm-project/pull/123533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread Richard Smith via cfe-commits
@@ -65,7 +65,8 @@ namespace InFunctions { template struct S3 { // expected-note {{template parameter is declared here}} template using T = int; // expected-error {{declaration of 'T' shadows template parameter}} }; - template using Z = Z; + template // expected-note

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Wael Yehia (w2yehia) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/124353.diff 6 Files Affected: - (modified) clang/docs/UsersManual.rst (+8) - (modified) clang/include/clang/Basic/CodeGenOptions.def (+1) -

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-24 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia created https://github.com/llvm/llvm-project/pull/124353 None >From abef90fe8f46431a5fb8b7fe717c9fb65eb30266 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Thu, 23 Jan 2025 00:03:15 + Subject: [PATCH] [PGO] Add a clang option -fprofile-continuous that enables P

[clang] Fix false negative when value initializing a field annotated with [[clang::require_field_initialization]] (PR #124329)

2025-01-24 Thread via cfe-commits
higher-performance wrote: Note the build error appears unrelated: ``` # | /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-gwhg7-1/llvm-project/github-pull-requests/build-runtimes/libcxxabi/test-suite-install/include/c++/v1/__chrono/utc_clock.h:94:11: error: unknown type name 'tzdb' # |9

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2025-01-24 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/120734 >From 55fb96c1673911f30721c2a53bea32e7e4b5dc6e Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 20 Dec 2024 15:32:55 +0200 Subject: [PATCH 1/3] [Clang] handle [[warn_unused]] attribute for unused privat

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove features predres and ls64. (PR #124266)

2025-01-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang,compiler-rt,llvm` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/1237

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-01-24 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/120896 >From 295df258043ef5a87ae603eedd308b863bad7b59 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 22 Dec 2024 15:14:30 +0200 Subject: [PATCH] [Clang] allow restrict qualifier for array types with pointer

[clang] df9b31f - [clang][Sema] Handle undeduced auto types in HeuristicResolver (#124236)

2025-01-24 Thread via cfe-commits
Author: Nathan Ridge Date: 2025-01-24T16:11:18-05:00 New Revision: df9b31f1e0cdb8096e9d2e0749e473dd815b39f7 URL: https://github.com/llvm/llvm-project/commit/df9b31f1e0cdb8096e9d2e0749e473dd815b39f7 DIFF: https://github.com/llvm/llvm-project/commit/df9b31f1e0cdb8096e9d2e0749e473dd815b39f7.diff

[clang] [clang][Sema] Handle undeduced auto types in HeuristicResolver (PR #124236)

2025-01-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/124236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/124319 >From 581cc0eda9d42458ff71f2c913a2e03d2de0b5f2 Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Fri, 19 Jul 2024 14:26:23 -0700 Subject: [PATCH 1/5] This commit is to resolve the issue #24841 -

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

2025-01-24 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: There's probably a better way, but I just built my first clang normally then built a second one with `-DCMAKE_C_COMPILER` and `-DCMAKE_CXX_COMPILER` pointing to the first one, and `-DLLVM_ENABLE_MODULES=1` to enable modules. https://github.com/llvm/llvm-project/pull/122726 _

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/124313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -11682,6 +11683,7 @@ class Sema final : public SemaBase { SmallVectorImpl &SugaredConverted, SmallVectorImpl &CanonicalConverted, CheckTemplateArgumentKind CTAK, bool PartialOrdering, +

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-24 Thread Amr Hesham via cfe-commits
@@ -216,11 +244,18 @@ int compareit(float a, float b) { // no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the currently enabled floating-point options}} // no-inf-warning@+1 {{use of infinity is undefined behavior due to the currently enabled floatin

[clang] [clang] Add __nullptr as a keyword to C (PR #123119)

2025-01-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/123119 >From 51372333df218cfb4fa8dcc0cebee03c0e3ebc5f Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 15 Jan 2025 15:24:12 -0500 Subject: [PATCH 1/8] __nullptr -> KEYALL, added relevant test --- clang/include/c

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

  1   2   3   4   >