[clang] [llvm] AMDGPU: Add v_smfmac_f32_16x16x128_bf8_fp8 for gfx950 (PR #117233)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/117233 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add v_smfmac_f32_16x16x128_bf8_bf8 for gfx950 (PR #117232)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/117232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3678f8a - AMDGPU: Add v_smfmac_f32_16x16x128_bf8_fp8 for gfx950 (#117233)

2024-11-21 Thread via cfe-commits
Author: Matt Arsenault Date: 2024-11-21T17:00:08-08:00 New Revision: 3678f8a8aae4f318c82d290044f3d19a05e74ffc URL: https://github.com/llvm/llvm-project/commit/3678f8a8aae4f318c82d290044f3d19a05e74ffc DIFF: https://github.com/llvm/llvm-project/commit/3678f8a8aae4f318c82d290044f3d19a05e74ffc.diff

[clang] [llvm] AMDGPU: Add v_smfmac_f32_16x16x128_bf8_fp8 for gfx950 (PR #117233)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/117233 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-11-21 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,34 @@ +.. title:: clang-tidy - modernize-use-integer-sign-comparison + +modernize-use-integer-sign-comparison += + +Replace comparisons between signed and unsigned integers with their safe +C++20 ``std::cmp_*`` alternative, if availab

[clang] [lld] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-11-21 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode updated https://github.com/llvm/llvm-project/pull/112035 >From 48808d43f41b61a419790fd25f99b5e897e5a419 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 11 Oct 2024 04:30:32 -0700 Subject: [PATCH 1/4] [WebAssembly] Define call-indirect-overlong and bulk-memor

[clang] [llvm] AMDGPU: Add v_smfmac_f32_16x16x128_fp8_bf8 for gfx950 (PR #117234)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/117234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add v_smfmac_f32_16x16x128_fp8_fp8 for gfx950 (PR #117235)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/117235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add v_smfmac_f32_16x16x128_fp8_fp8 for gfx950 (PR #117235)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/117235 >From 4067f0dfb8cf7a443f343f54d9dbcbeb6e296381 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Sat, 3 Feb 2024 20:43:58 +0530 Subject: [PATCH] AMDGPU: Add v_smfmac_f32_16x16x128_fp8_fp8 for gfx950 --- clang

[clang] 3312491 - AMDGPU: Add v_smfmac_f32_16x16x128_fp8_bf8 for gfx950 (#117234)

2024-11-21 Thread via cfe-commits
Author: Matt Arsenault Date: 2024-11-21T17:03:03-08:00 New Revision: 33124910c9f4877c069c0358159763c03e10ca31 URL: https://github.com/llvm/llvm-project/commit/33124910c9f4877c069c0358159763c03e10ca31 DIFF: https://github.com/llvm/llvm-project/commit/33124910c9f4877c069c0358159763c03e10ca31.diff

[clang] 2369a58 - [Clang] Fix handling of non-member functions in isNormalAssignmentOperator() (#115880)

2024-11-21 Thread via cfe-commits
Author: smanna12 Date: 2024-11-21T19:18:49-06:00 New Revision: 2369a582c260aafd46ce09e75e884fb654fd330d URL: https://github.com/llvm/llvm-project/commit/2369a582c260aafd46ce09e75e884fb654fd330d DIFF: https://github.com/llvm/llvm-project/commit/2369a582c260aafd46ce09e75e884fb654fd330d.diff LOG:

[clang] [Clang] Fix handling of non-member functions in isNormalAssignmentOperator() (PR #115880)

2024-11-21 Thread via cfe-commits
https://github.com/smanna12 closed https://github.com/llvm/llvm-project/pull/115880 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Disallow named struct types as parameters in target extension types (PR #115971)

2024-11-21 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 d2db9bd708f1f1d4368e0b2d3870dd8c307c9895 c3e6120c0d3efb7b5aeae864e164976a1d869b6f --e

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-11-21 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,182 @@ +//===--- UseIntegerSignComparisonCheck.cpp - clang-tidy ---===// +// +// 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] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode updated https://github.com/llvm/llvm-project/pull/117087 >From 48808d43f41b61a419790fd25f99b5e897e5a419 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 11 Oct 2024 04:30:32 -0700 Subject: [PATCH 1/5] [WebAssembly] Define call-indirect-overlong and bulk-memor

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode updated https://github.com/llvm/llvm-project/pull/117087 >From 48808d43f41b61a419790fd25f99b5e897e5a419 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 11 Oct 2024 04:30:32 -0700 Subject: [PATCH 1/6] [WebAssembly] Define call-indirect-overlong and bulk-memor

[clang] [ObjC] Enable diagnose_if on Objective-C methods (PR #115056)

2024-11-21 Thread John McCall via cfe-commits
rjmccall wrote: Having an abstraction for this would be nice. It doesn't *have* to be a base class specifically, though; we can do a more extrinsic tagged-union without actually unifying the class hierarchies, like `llvm::CallSite` does. Swift has a type called `AnyFunctionRef` that unifies se

[clang] [Clang] Enable -fpointer-tbaa by default. (PR #117244)

2024-11-21 Thread John McCall via cfe-commits
https://github.com/rjmccall commented: This seems reasonable to me. Since it's standards-compliant, has a specific opt-out flag, and is overridden by the general `-fno-strict-aliasing` flag, I don't see any need for the RFC process. Still, you should definitely wait for more feedback, especial

[clang] [llvm] [llvm][NFC] Add missing semantics to enum (PR #117291)

2024-11-21 Thread Matthias Springer via cfe-commits
https://github.com/matthias-springer created https://github.com/llvm/llvm-project/pull/117291 * Add missing semantics to the `Semantics` enum. * Move all documentation of the different semantics to the header file. * Rename the `EnumToSemanatics` to `getSemantics`. * Store enum value in `fltSema

[clang] [llvm] [llvm][NFC] `APFloat`: Add missing semantics to enum (PR #117291)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-adt Author: Matthias Springer (matthias-springer) Changes * Add missing semantics to the `Semantics` enum. * Move all documentation of the different semantics to the header file. * Rename the `EnumToSemanatics` to `getSema

[clang] [llvm] [llvm][NFC] `APFloat`: Add missing semantics to enum (PR #117291)

2024-11-21 Thread Matthias Springer via cfe-commits
https://github.com/matthias-springer edited https://github.com/llvm/llvm-project/pull/117291 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Disallow named struct types as parameters in target extension types (PR #115971)

2024-11-21 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/115971 >From 7413ceb21a6e0ac9212ef6317763ee0eff559612 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 12 Nov 2024 16:44:00 -0800 Subject: [PATCH 1/6] print struct body within target ext ty context --- .../t

[clang] dc580c9 - Switch test back from getRealFileSystem to createPhysicalFileSystem

2024-11-21 Thread James Y Knight via cfe-commits
Author: James Y Knight Date: 2024-11-21T21:03:11-05:00 New Revision: dc580c9cf65d9bdad92e127325b50e712422379b URL: https://github.com/llvm/llvm-project/commit/dc580c9cf65d9bdad92e127325b50e712422379b DIFF: https://github.com/llvm/llvm-project/commit/dc580c9cf65d9bdad92e127325b50e712422379b.diff

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-21 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,43 @@ +! Test --print-supported-cpus and associated aliases, -mcpu=help and +! -mtune=help + +! RUN: %if x86-registered-target %{ \ +! RUN: %flang --target=x86_64-unknown-linux-gnu --print-supported-cpus 2>&1 \ +! RUN: | FileCheck %s --check-prefixes=X86,CHECK \ +

[clang] [clang] __STDC_NO_THREADS__ is no longer necessary for VS 2022 1939 and above (PR #117149)

2024-11-21 Thread Dipesh Sharma via cfe-commits
dipeshs809 wrote: > Thank you for working on this! Please be sure to add some test coverage for > the changes to `clang/test/Headers` and a release note in > `clang/docs/ReleaseNotes.rst`. Thanks for the review. I'll incorporate the changes suggested and come back to you. https://github.com/

[clang] [llvm] [HLSL] Add implicit resource element type concepts to AST (PR #116413)

2024-11-21 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/116413 >From 92ccbe72ca95ad2df5a81b76244a8a8d7cedef40 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 15 Nov 2024 09:00:15 -0800 Subject: [PATCH 1/7] update new tests --- clang/lib/Sema/HLSLExternalSemaSour

[clang-tools-extra] [clangd] Check getFunctionTypeLoc() for validity in InlayHintVisitor (PR #117296)

2024-11-21 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/117296 Fixes https://github.com/clangd/clangd/issues/2223 >From ac19feac7e59e7fdcef89a091cbecaaf3d50b512 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Fri, 22 Nov 2024 01:51:06 -0500 Subject: [PATCH] [clang

[clang-tools-extra] [clangd] Check getFunctionTypeLoc() for validity in InlayHintVisitor (PR #117296)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Nathan Ridge (HighCommander4) Changes Fixes https://github.com/clangd/clangd/issues/2223 --- Full diff: https://github.com/llvm/llvm-project/pull/117296.diff 2 Files Affected: - (modified) clang-tools-extra/clangd/InlayHints.cpp (+9-4)

[clang] [clang][APINotes] Do not add duplicate lifetimebound annotation (PR #117194)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Gábor Horváth (Xazax-hun) Changes In case a method already is lifetimebound annotated we should not add a second annotation to the type. --- Full diff: https://github.com/llvm/llvm-project/pull/117194.diff 6 Files Affected: - (modified

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-21 Thread Steven Perron via cfe-commits
@@ -3158,6 +3172,166 @@ bool SPIRVInstructionSelector::selectFirstBitHigh(Register ResVReg, } } +bool SPIRVInstructionSelector::selectFirstBitLow16(Register ResVReg, + const SPIRVType *ResType, +

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-21 Thread Steven Perron via cfe-commits
@@ -3158,6 +3172,166 @@ bool SPIRVInstructionSelector::selectFirstBitHigh(Register ResVReg, } } +bool SPIRVInstructionSelector::selectFirstBitLow16(Register ResVReg, + const SPIRVType *ResType, +

[clang] [Serialization] Downgrade inconsistent flags from erros to warnings (PR #115416)

2024-11-21 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: @Bigcheese -- I'd appreciate an explicit review from you on this as a component maintainer. https://github.com/llvm/llvm-project/pull/115416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-21 Thread Sarah Spall via cfe-commits
@@ -3158,6 +3172,166 @@ bool SPIRVInstructionSelector::selectFirstBitHigh(Register ResVReg, } } +bool SPIRVInstructionSelector::selectFirstBitLow16(Register ResVReg, + const SPIRVType *ResType, +

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tarun Prabhu (tarunprabhu) Changes The aliases are -mcpu=help and -mtune=help. There is still an issue with the output which prints an example line that references clang. That is not fixed here because it is printed in llvm/MC/SubtargetIn

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver @llvm/pr-subscribers-clang-driver Author: Tarun Prabhu (tarunprabhu) Changes The aliases are -mcpu=help and -mtune=help. There is still an issue with the output which prints an example line that references clang. That is not fixed here bec

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-21 Thread Steven Perron via cfe-commits
@@ -3158,6 +3172,166 @@ bool SPIRVInstructionSelector::selectFirstBitHigh(Register ResVReg, } } +bool SPIRVInstructionSelector::selectFirstBitLow16(Register ResVReg, + const SPIRVType *ResType, +

[clang] [flang] [llvm] seq_cst is allowed in Flush since OpenMP 5.1. (PR #114072)

2024-11-21 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/114072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] __STDC_NO_THREADS__ is no longer necessary for VS 2022 1939 and above (PR #117149)

2024-11-21 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/117149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] __STDC_NO_THREADS__ is no longer necessary for VS 2022 1939 and above (PR #117149)

2024-11-21 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for working on this! Please be sure to add some test coverage for the changes to `clang/test/Headers` and a release note in `clang/docs/ReleaseNotes.rst`. https://github.com/llvm/llvm-project/pull/117149 _

[clang] [clang] __STDC_NO_THREADS__ is no longer necessary for VS 2022 1939 and above (PR #117149)

2024-11-21 Thread Aaron Ballman via cfe-commits
@@ -248,8 +248,19 @@ static void addVisualCDefines(const LangOptions &Opts, MacroBuilder &Builder) { Builder.defineMacro("_KERNEL_MODE"); Builder.defineMacro("_INTEGRAL_MAX_BITS", "64"); - Builder.defineMacro("__STDC_NO_THREADS__"); - + // Define __STDC_NO_THREADS__ b

[clang] [Fuchsia][CMake] Enable new libc header gen (PR #116938)

2024-11-21 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek closed https://github.com/llvm/llvm-project/pull/116938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-21 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/117199 >From a7d176ed8c7aa9d22944600a301fb690b845935d Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Thu, 21 Nov 2024 09:53:49 -0700 Subject: [PATCH 1/2] [flang][Driver] Support -print-supported-cpus and associ

[clang] f881a38 - [CodeGen] Fix a warning

2024-11-21 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-11-21T10:27:05-08:00 New Revision: f881a3815a6b58afa64277eee0bb6b91a4dde103 URL: https://github.com/llvm/llvm-project/commit/f881a3815a6b58afa64277eee0bb6b91a4dde103 DIFF: https://github.com/llvm/llvm-project/commit/f881a3815a6b58afa64277eee0bb6b91a4dde103.diff L

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension (PR #117169)

2024-11-21 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. I am out of the loop on the discussion in the call today, but I can confirm this is a correct implementation of Xqcicsr, according to the specification. https://github.com/llvm/llvm-project/pull/117169 ___

[clang] [webkit.UncountedLambdaCapturesChecker] Fix debug assertion failure. (PR #117090)

2024-11-21 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/117090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Introduce symbol versioning for clang-cpp (PR #116556)

2024-11-21 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: We don't run into the same issue with the `LLVM` library because `LLVM_BUILD_LLVM_DYLIB` defaults to off. There is no counterpart toggle for `clang-cpp`, so it's being built on the bot. I suppose that with `-DLLVM_BUILD_LLVM_DYLIB=ON` the bot would also run into issues with

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-21 Thread Sarah Spall via cfe-commits
@@ -3158,6 +3172,166 @@ bool SPIRVInstructionSelector::selectFirstBitHigh(Register ResVReg, } } +bool SPIRVInstructionSelector::selectFirstBitLow16(Register ResVReg, + const SPIRVType *ResType, +

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-21 Thread Aaron Ballman via cfe-commits
@@ -1472,3 +1472,105 @@ template struct Outer { }; }; Outer::Inner outerinner; + +void aggregate() { + struct NonAgg { +NonAgg() { } +[[clang::requires_explicit_initialization]] int na; // expected-warning {{'requires_explicit_initialization' attribute is ignored i

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-11-21 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/116331 >From 3c792216f88e87b69b3ea7415c2fd74b7f5d7469 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Fri, 25 Oct 2024 17:48:41 + Subject: [PATCH 01/10] adding comments --- clang/include/clang/Basic/Attr.td

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-11-21 Thread via cfe-commits
https://github.com/joaosaffran ready_for_review https://github.com/llvm/llvm-project/pull/116331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix -Wunused-private-field false negative with defaulted comparison operators (PR #116871)

2024-11-21 Thread Chris White via cfe-commits
https://github.com/whiteio updated https://github.com/llvm/llvm-project/pull/116871 >From c69426607d63b3a0cf7d839c82cde55273a5f942 Mon Sep 17 00:00:00 2001 From: Chris White Date: Tue, 19 Nov 2024 20:06:28 + Subject: [PATCH 1/2] [Clang] Fix -Wunused-private-field false negative with defaul

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-11-21 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,731 @@ +//===-- Mustache.cpp --===// +// +// 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] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-21 Thread Aaron Ballman via cfe-commits
@@ -2318,6 +2318,10 @@ def err_init_list_bad_dest_type : Error< def warn_cxx20_compat_aggregate_init_with_ctors : Warning< "aggregate initialization of type %0 with user-declared constructors " "is incompatible with C++20">, DefaultIgnore, InGroup; +def warn_cxx20_compat_re

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-11-21 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,731 @@ +//===-- Mustache.cpp --===// +// +// 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] [HLSL] Add ByteAddressBuffer definition to HLSLExternalSemaSource #113477 (PR #116699)

2024-11-21 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,41 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump -DEMPTY %s | FileCheck -check-prefix=EMPTY %s +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump %s | FileCheck %s + hekota wrote: FYI, we ar

[clang] [HLSL] Add ByteAddressBuffer definition to HLSLExternalSemaSource #113477 (PR #116699)

2024-11-21 Thread Helena Kotas via cfe-commits
@@ -531,6 +531,16 @@ void HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() { .addArraySubscriptOperators() .completeDefinition(); }); + + Decl = BuiltinTypeDeclBuilder(*SemaPtr, HLSLNamespace, "ByteAddressBuffer") + .Record; + on

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-21 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: > Notes for reviewers: The corresponding test in > clang/test/Driver/print-supported-cpus.c tests two different architectures in > the same file. This has been split into two separate tests here to allow the > test to be run in cases where only one of the targets has been b

[clang] [rtsan] NFC: Update docs with suppress_equal_stacks (PR #117187)

2024-11-21 Thread via cfe-commits
https://github.com/davidtrevelyan approved this pull request. https://github.com/llvm/llvm-project/pull/117187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-21 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space edited https://github.com/llvm/llvm-project/pull/117199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-21 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space commented: Thanks, makes sense. From what I can tell, the behaviour is consistent with Clang (i.e. `-print-supported-cpus` invalidates any other action flags). Just a couple of smallish comments/suggestions https://github.com/llvm/llvm-project/pull/117199 __

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-21 Thread Andrzej Warzyński via cfe-commits
@@ -5899,8 +5899,10 @@ def print_enabled_extensions : Flag<["-", "--"], "print-enabled-extensions">, HelpText<"Print the extensions enabled by the given target and -march/-mcpu options." " (AArch64 and RISC-V only)">, MarshallingInfoFlag>; -def : Flag<["-"], "m

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-11-21 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,731 @@ +//===-- Mustache.cpp --===// +// +// 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] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-21 Thread Andrzej Warzyński via cfe-commits
@@ -4417,7 +4417,8 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args, // Use the -mcpu=? flag as the dummy input to cc1. Actions.clear(); - Action *InputAc = C.MakeAction(*A, types::TY_C); + Action *InputAc = C.MakeAction( + *A,

[clang] Add a testcase for riscv64-linux-android triple (PR #116892)

2024-11-21 Thread via cfe-commits
https://github.com/hiraditya updated https://github.com/llvm/llvm-project/pull/116892 >From ae11dfe5bd55b75198a0ee09bb9b8c328de5d34a Mon Sep 17 00:00:00 2001 From: AdityaK Date: Tue, 19 Nov 2024 15:54:16 -0800 Subject: [PATCH] Add a testcase for riscv64-linux-android triple --- clang/test/Dri

[clang] [webkit.UncountedLambdaCapturesChecker] Fix debug assertion failure. (PR #117090)

2024-11-21 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/117090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make armv6 iOS by default instead of macOS when targeting Darwin (PR #117243)

2024-11-21 Thread via cfe-commits
https://github.com/Un1q32 created https://github.com/llvm/llvm-project/pull/117243 AFAIK the only publicly released armv6 devices that ran Darwin were the iPhone 2G, iPhone 3G, iPod touch 1, and the iPod touch 2, all of which were iOS devices. >From a15d1120fc54059eb009b6da7d81ffae79cbd868 Mo

[clang] 9492744 - [webkit.UncountedLambdaCapturesChecker] Fix debug assertion failure. (#117090)

2024-11-21 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2024-11-21T13:29:15-08:00 New Revision: 9492744dc3bb483f6a723a6abef0195b93e25cde URL: https://github.com/llvm/llvm-project/commit/9492744dc3bb483f6a723a6abef0195b93e25cde DIFF: https://github.com/llvm/llvm-project/commit/9492744dc3bb483f6a723a6abef0195b93e25cde.diff

[clang] Make armv6 iOS by default instead of macOS when targeting Darwin (PR #117243)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: None (Un1q32) Changes AFAIK the only publicly released armv6 devices that ran Darwin were the iPhone 2G, iPhone 3G, iPod touch 1, and the iPod touch 2, all of which were iOS devices. --- Full diff: https

[clang] [webkit.UncountedLambdaCapturesChecker] Fix debug assertion failure. (PR #117090)

2024-11-21 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/117090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-21 Thread Bill Wendling via cfe-commits
bwendling wrote: > I think this might honestly be fine the way it is now Yeah. It's going kind of the opposite way from what you suggested with the placeholder, just instead of allowing for different uses at various places in Sema we disallow without using the placeholder. https://github.com/

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-21 Thread Bill Wendling via cfe-commits
@@ -14690,6 +14690,14 @@ void Sema::FinalizeDeclaration(Decl *ThisDecl) { } } + // The result of __builtin_counted_by_ref cannot be assigned to a variable. + // It allows leaking and modification of bounds safety information. + if (const auto *CE = dyn_cast_if_present

[clang] [TBAA] Don't emit pointer tbaa for unnamed structs or unions. (PR #116596)

2024-11-21 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. https://github.com/llvm/llvm-project/pull/116596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove Linux search paths on Windows (PR #113628)

2024-11-21 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Okay, so it definitely uses the device side, however the ROCmToolChain does not take a host ToolChain. I'm wondering why the CUDA toolchain doesn't have this issue, it checks the HostTriple for Windows just fine. https://github.com/llvm/llvm-project/pull/113628 _

[clang] [Clang] Enable -fpointer-tbaa by default. (PR #117244)

2024-11-21 Thread Florian Hahn via cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/117244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (PR #117017)

2024-11-21 Thread Helena Kotas via cfe-commits
@@ -1,22 +1,22 @@ // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute -finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s // NOTE: The number in type name and whether the struct is packed or not will mostly -// likely change once subscript ope

[clang] [HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (PR #117017)

2024-11-21 Thread Helena Kotas via cfe-commits
@@ -1,22 +1,22 @@ // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute -finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s // NOTE: The number in type name and whether the struct is packed or not will mostly -// likely change once subscript ope

[clang] [HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (PR #117017)

2024-11-21 Thread Helena Kotas via cfe-commits
@@ -4738,6 +4738,12 @@ def GetDeviceSideMangledName : LangBuiltin<"CUDA_LANG"> { } // HLSL +def HLSLTypedBufferPointer : LangBuiltin<"HLSL_LANG"> { + let Spellings = ["__builtin_hlsl_resource_getpointer"]; hekota wrote: Is this for all buffer types or just t

[clang] [HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (PR #117017)

2024-11-21 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. Few nits, otherwise LGTM! https://github.com/llvm/llvm-project/pull/117017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-21 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/116719 >From 2dcf18163de2ccce959f46bf82df1fa40e3fd1fc Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 15 Nov 2024 15:41:48 -0800 Subject: [PATCH 1/8] [Clang] Improve Sema diagnostic performance for __builtin

[clang] [Clang] Enable -fpointer-tbaa by default. (PR #117244)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Florian Hahn (fhahn) Changes Support for more precise TBAA metadata has been added a while ago (behind the -fpointer-tbaa flag). The more precise TBAA metadata allows treating accesses of different pointer types as no-alias. This helps t

[clang] [clang][APINotes] Do not add duplicate lifetimebound annotation (PR #117194)

2024-11-21 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun created https://github.com/llvm/llvm-project/pull/117194 In case a method already is lifetimebound annotated we should not add a second annotation to the type. From 9980bec9888d1356fbf330dc4355ba8be24955cf Mon Sep 17 00:00:00 2001 From: Gabor Horvath Date: Thu, 21

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-21 Thread Steven Perron via cfe-commits
https://github.com/s-perron commented: There is only potential problem with the vector sizes. Sorry I did not catch that on the previous PR. I would also like to see the code refactored a little to reduce the amount of repeated code. I think each step except for 2 in `selectFirstBit*64` could

[clang] [Clang] Prevent potential null pointer dereferences (PR #117176)

2024-11-21 Thread Aaron Ballman via cfe-commits
@@ -627,7 +627,7 @@ class Analyzer { IsNoexcept = isNoexcept(FD); } else if (auto *BD = dyn_cast(D)) { if (auto *TSI = BD->getSignatureAsWritten()) { -auto *FPT = TSI->getType()->getAs(); +auto *FPT = TSI->getType()->castAs();

[clang] [lld] [llvm] [Windows] Add support for emitting PGO/LTO magic strings in the Windows PE debug directory (PR #114260)

2024-11-21 Thread Reid Kleckner via cfe-commits
@@ -112,6 +112,8 @@ class MCTargetOptions { // Whether or not to use full register names on PowerPC. bool PPCUseFullRegisterNames : 1; + bool PgoInstrumentation = false; rnk wrote: Target options like this don't play well with (thin)LTO , because they do

[clang] [clang] Warn const integer-overflow of member in temporary struct bound to rvalue reference (PR #117225)

2024-11-21 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/117225 Fixes #46755 >From 08e1a3388e9d98f2469687d2367472342b05c47e Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Thu, 21 Nov 2024 13:05:20 -0600 Subject: [PATCH] [clang] Warn const integer-overflow of member in te

[clang] [clang] Warn const integer-overflow of member in temporary struct bound to rvalue reference (PR #117225)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Youngsuk Kim (JOE1994) Changes Fixes #46755 --- Full diff: https://github.com/llvm/llvm-project/pull/117225.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+3) - (modified) clang/lib/Sema/SemaChecking.cpp (+2-1) - (mo

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-11-21 Thread Jun Wang via cfe-commits
jwanggit86 wrote: I plan to submit this PR next week by Nov 26. Pls let me know if you have additional comments. https://github.com/llvm/llvm-project/pull/94647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] clang: Relax LangOpts checks when lexing quoted numbers during preprocessing (PR #95798)

2024-11-21 Thread via cfe-commits
@@ -2068,7 +2068,8 @@ bool Lexer::LexNumericConstant(Token &Result, const char *CurPtr) { } // If we have a digit separator, continue. - if (C == '\'' && (LangOpts.CPlusPlus14 || LangOpts.C23)) { + if (C == '\'' && + (LangOpts.CPlusPlus14 || LangOpts.C23 || Parsing

[clang] [TBAA] Don't emit pointer tbaa for unnamed structs or unions. (PR #116596)

2024-11-21 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/116596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-21 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space approved this pull request. LGTM, my final comment is nit - feel free to ignore. Thanks! https://github.com/llvm/llvm-project/pull/117199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-21 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,43 @@ +! Test --print-supported-cpus and associated aliases, -mcpu=help and +! -mtune=help + +! RUN: %if x86-registered-target %{ \ +! RUN: %flang --target=x86_64-unknown-linux-gnu --print-supported-cpus 2>&1 \ +! RUN: | FileCheck %s --check-prefixes=X86,CHECK \ +

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-21 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space edited https://github.com/llvm/llvm-project/pull/117199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Don't emit pointer tbaa for unnamed structs or unions. (PR #116596)

2024-11-21 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/116596 >From df9460221a937f9a705f6ddf7c080ca9b7fa4e3f Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 17 Nov 2024 20:07:57 + Subject: [PATCH 1/3] [TBAA] Don't emit pointer tbaa for unnamed structs or unions.

[clang] [TBAA] Don't emit pointer tbaa for unnamed structs or unions. (PR #116596)

2024-11-21 Thread Florian Hahn via cfe-commits
@@ -249,6 +249,21 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { if (!Ty->isRecordType()) return AnyPtr; + // For unnamed structs or unions C's compatible types rule applies. Two + // compatible types in different compilation units c

[clang] Remove Linux search paths on Windows (PR #113628)

2024-11-21 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > Is there an issue with simply using the `HostTC` for everything? I feel > > like that's the solution to this mess, since the `HostTC` would always know > > whether or not the target is Windows without us needing to forward a bunch > > of stuff. > > Yes, that would work too.

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-21 Thread Julian Schmidt via cfe-commits
@@ -265,4 +255,63 @@ void test(std::string s, std::string_view sv, sub_string ss, sub_sub_string sss, s.compare(0, 1, "ab") == 0; s.rfind(suffix, 1) == s.size() - suffix.size(); + + #define STR(x) std::string(x) + 0 == STR(s).find("a"); + + #define STRING s + if (0 ==

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-21 Thread Julian Schmidt via cfe-commits
@@ -171,10 +182,26 @@ void UseStartsEndsWithCheck::registerMatchers(MatchFinder *Finder) { hasRHS(lengthExprForStringNode("needle") .bind("expr"), this); + + // Case 6: X.substr(0, LEN(Y)) [!=]= Y -> ends_with.

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

2024-11-21 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/106036 >From d4b07c7ff65ca64a5a434818ce09ecd289401340 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Tue, 10 Sep 2024 02:35:43 +0300 Subject: [PATCH] [Clang] restrict use of attribute names reserved by the C++ st

[clang] [Clang] Prevent potential null pointer dereferences (PR #117176)

2024-11-21 Thread Doug Wyatt via cfe-commits
@@ -627,7 +627,7 @@ class Analyzer { IsNoexcept = isNoexcept(FD); } else if (auto *BD = dyn_cast(D)) { if (auto *TSI = BD->getSignatureAsWritten()) { -auto *FPT = TSI->getType()->getAs(); +auto *FPT = TSI->getType()->castAs();

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-21 Thread Julian Schmidt via cfe-commits
@@ -183,40 +210,47 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { const auto *EndsWithFunction = Result.Nodes.getNodeAs("ends_with_fun"); assert(bool(StartsWithFunction) != bool(EndsWithFunction)); + const CXXMethodDecl *Replacemen

<    1   2   3   4   5   6   >