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

2024-09-27 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,489 @@ +//===-- 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-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-27 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,489 @@ +//===-- 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-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-27 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,190 @@ +//===--- Mustache.h -*- 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-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-27 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,489 @@ +//===-- 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] Make HLSLAttributesResourceType cannonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-27 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/110327 Translates `RWBuffer` and `StructuredBuffer` resources to DirectX target types `dx.TypedBuffer` and `dx.RawBuffer`. Includes a change of `HLSLAttributesResourceType` from 'sugar' type to full canonical type. Th

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

2024-09-27 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,102 @@ +//===- mustache.cpp - The LLVM Modular Optimizer +//---===// ilovepi wrote: Lets put this in a follow up patch. https://github.com/llvm/llvm-project/pull/105893 ___ cfe-co

[clang] [HLSL] Make HLSLAttributesResourceType cannonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-27 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/110327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Make HLSLAttributesResourceType cannonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-27 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/110327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4407cf9 - [HLSL] Vector Usual Arithmetic Conversions (#110195)

2024-09-27 Thread via cfe-commits
Author: Chris B Date: 2024-09-27T15:47:22-05:00 New Revision: 4407cf95d565ddba82d697e0ade58d64a0cc2ed7 URL: https://github.com/llvm/llvm-project/commit/4407cf95d565ddba82d697e0ade58d64a0cc2ed7 DIFF: https://github.com/llvm/llvm-project/commit/4407cf95d565ddba82d697e0ade58d64a0cc2ed7.diff LOG:

[clang] [HLSL] Vector Usual Arithmetic Conversions (PR #110195)

2024-09-27 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/110195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -0,0 +1,187 @@ +//===-- amdgpuintrin.h - AMDPGU intrinsic functions ---===// +// +// 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] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-27 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/110327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -0,0 +1,184 @@ +//===-- nvptxintrin.h - NVPTX intrinsic functions -===// +// +// 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] [rtsan] Update docs to include run-time flags (PR #110296)

2024-09-27 Thread Chris Apple via cfe-commits
https://github.com/cjappl updated https://github.com/llvm/llvm-project/pull/110296 >From eb8712a4eb82495a84e593c375f787017380de40 Mon Sep 17 00:00:00 2001 From: Chris Apple Date: Fri, 27 Sep 2024 09:40:11 -0700 Subject: [PATCH 1/3] [rtsan] Update docs to include run-time flags --- clang/docs/

[clang] [NVPTX] Add a clang builtin for the `warpsize` intrinsic (PR #110316)

2024-09-27 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/110316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -0,0 +1,187 @@ +//===-- amdgpuintrin.h - AMDPGU intrinsic functions ---===// +// +// 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] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-09-27 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,184 @@ +//===-- nvptxintrin.h - NVPTX intrinsic functions -===// +// +// 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] c650067 - [NVPTX] Add a clang builtin for the `warpsize` intrinsic (#110316)

2024-09-27 Thread via cfe-commits
Author: Joseph Huber Date: 2024-09-27T13:52:44-07:00 New Revision: c6500671ed3352ce4f7fb1e0411b66e74a6ea3da URL: https://github.com/llvm/llvm-project/commit/c6500671ed3352ce4f7fb1e0411b66e74a6ea3da DIFF: https://github.com/llvm/llvm-project/commit/c6500671ed3352ce4f7fb1e0411b66e74a6ea3da.diff

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

2024-09-27 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,489 @@ +//===-- 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-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-27 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,489 @@ +//===-- 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] f11775f - [libclang/python] Do not rely on `ctypes`' `errcheck` (#105490)

2024-09-27 Thread via cfe-commits
Author: Jannick Kremer Date: 2024-09-27T22:17:11+02:00 New Revision: f11775f0a2af66b33934fccc5a6566c462a8f6a0 URL: https://github.com/llvm/llvm-project/commit/f11775f0a2af66b33934fccc5a6566c462a8f6a0 DIFF: https://github.com/llvm/llvm-project/commit/f11775f0a2af66b33934fccc5a6566c462a8f6a0.diff

[clang] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -0,0 +1,184 @@ +//===-- nvptxintrin.h - NVPTX intrinsic functions -===// +// +// 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] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-backend-directx Author: Helena Kotas (hekota) Changes Translates `RWBuffer` and `StructuredBuffer` resources buffer types to DirectX target types `dx.TypedBuffer` and `dx.RawBuffer`. Includes a change of `HLSLAttribut

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-27 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/110327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [rtsan] Update docs to include run-time flags (PR #110296)

2024-09-27 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/110296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Helena Kotas (hekota) Changes Translates `RWBuffer` and `StructuredBuffer` resources buffer types to DirectX target types `dx.TypedBuffer` and `dx.RawBuffer`. Includes a change of `HLSLAttributesResourceType` from 'sugar' type to full ca

[clang] [rtsan] Update docs to include run-time flags (PR #110296)

2024-09-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris Apple (cjappl) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/110296.diff 1 Files Affected: - (modified) clang/docs/RealtimeSanitizer.rst (+69) ``diff diff --git a/clang/docs/RealtimeSanitizer.rst b/c

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify features ssbs and ssbs2. (PR #110297)

2024-09-27 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/110297 According to https://developer.arm.com/documentation/102105/latest Arm Architecture Reference Manual for A-profile architecture: Known issues 2.206 D22789 In section C5.2.25 "SSBS, Speculative Store Bypass Saf

[clang] [clang][test] add testing for the AST matcher reference (PR #94248)

2024-09-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-arm64-windows-msvc` running on `linaro-armv8-windows-msvc-04` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/161/builds/2377 Here is the relev

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-27 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum closed https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

2024-09-27 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/105490 >From 2e4651345d1bde971be3a2c40602acf68f2c9519 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Wed, 21 Aug 2024 11:50:05 +0200 Subject: [PATCH] [libclang/python] Do not rely on ctypes' errcheck Call co

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-27 Thread Matheus Izvekov via cfe-commits
@@ -2211,17 +2211,20 @@ CXXDeductionGuideDecl *CXXDeductionGuideDecl::Create( ASTContext &C, DeclContext *DC, SourceLocation StartLoc, ExplicitSpecifier ES, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, SourceLocation EndLocation, CXXConstr

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

2024-09-27 Thread via cfe-commits
@@ -3141,6 +3148,10 @@ def warn_attribute_ignored_no_calls_in_stmt: Warning< "statement">, InGroup; +def warn_attribute_needs_aggregate : Warning< higher-performance wrote: I think I disagree. It's not really erroneous to do this, conceptually speaking.

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

2024-09-27 Thread via cfe-commits
@@ -4561,6 +4569,15 @@ static void TryConstructorInitialization(Sema &S, CXXConstructorDecl *CtorDecl = cast(Best->Function); if (Result != OR_Deleted) { +if (!IsListInit && Kind.getKind() == InitializationKind::IK_Default && +DestRecordDecl != nullptr && DestR

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

2024-09-27 Thread via cfe-commits
@@ -3141,6 +3148,10 @@ def warn_attribute_ignored_no_calls_in_stmt: Warning< "statement">, InGroup; +def warn_attribute_needs_aggregate : Warning< higher-performance wrote: Interesting, thanks for the context. From my standpoint, I haven't looked at most

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

2024-09-27 Thread Erich Keane via cfe-commits
@@ -2331,6 +2335,9 @@ def err_init_reference_member_uninitialized : Error< "reference member of type %0 uninitialized">; def note_uninit_reference_member : Note< "uninitialized reference member is here">; +def warn_field_requires_explicit_init : Warning< + "field %select{%

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

2024-09-27 Thread Erich Keane via cfe-commits
@@ -551,3 +551,14 @@ struct full_of_empty empty_test_2(void) { struct full_of_empty e; return e; // no-warning } + +struct with_explicit_field { + int x; + int y [[clang::requires_explicit_initialization]]; // expected-note {{declared}} +}; + +void aggregate() { + struc

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

2024-09-27 Thread Erich Keane via cfe-commits
@@ -1472,3 +1472,56 @@ template struct Outer { }; }; Outer::Inner outerinner; + +void aggregate() { + struct NonAgg { +NonAgg() { } +[[clang::requires_explicit_initialization]] int f; // expected-warning {{attribute is ignored}} + }; + NonAgg nonagg; + (void)non

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

2024-09-27 Thread Erich Keane via cfe-commits
@@ -2302,6 +2302,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] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-27 Thread via cfe-commits
@@ -6457,6 +6472,18 @@ void InitializationSequence::InitializeFrom(Sema &S, } } + if (!S.getLangOpts().CPlusPlus && + Kind.getKind() == InitializationKind::IK_Default) { +RecordDecl *Rec = DestType->getAsRecordDecl(); +if (Rec && Rec->hasUninitializedExplic

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

2024-09-27 Thread Erich Keane via cfe-commits
@@ -2331,6 +2335,9 @@ def err_init_reference_member_uninitialized : Error< "reference member of type %0 uninitialized">; def note_uninit_reference_member : Note< "uninitialized reference member is here">; +def warn_field_requires_explicit_init : Warning< + "field %select{%

[clang] [rtsan] Update docs to include run-time flags (PR #110296)

2024-09-27 Thread Chris Apple via cfe-commits
cjappl wrote: And if he is interested to review/stay up to date on our docs @dougsonos for review https://github.com/llvm/llvm-project/pull/110296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [NFC] Correct the misuse of the API in the Clang test-report script. (PR #108725)

2024-09-27 Thread via cfe-commits
c8ef wrote: Hi @nikic, Could you please help me review this patch? It shares the same origin as #107030, so hopefully, it won't take much time to review. Thanks! https://github.com/llvm/llvm-project/pull/108725 ___ cfe-commits mailing list cfe-commi

[clang] [lld] [llvm] Reapply "Deprecate the `-fbasic-block-sections=labels` option." (PR #110039)

2024-09-27 Thread Rahman Lavaee via cfe-commits
rlavaee wrote: Hi. This is expected. Please change your test to use --basic-block-address-map instead. On Fri, Sep 27, 2024 at 5:08 AM steelannelida ***@***.***> wrote: > This broke on of our tests. Here's a repro: > https://godbolt.org/z/5xc7GfxcY > > I'm not sure if that's intentional or a bu

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-27 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/107786 >From e9948a1004cc2b486a0422d83e88392754e9f7e9 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 23 Sep 2024 17:17:30 +0300 Subject: [PATCH 1/2] [Clang] prevent recovery call expression from proceeding w

[clang] [libcxxabi] [clang][ItaniumMangle] Mangle friend function templates with a constr… (PR #110247)

2024-09-27 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 approved this pull request. Thanks. LGTM. Left a comment to simplify the change. https://github.com/llvm/llvm-project/pull/110247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-09-27 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,63 @@ +; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s + +; ModuleID = '../clang/test/CodeGenHLSL/builtins/asuint-splitdouble.hlsl' +source_filename = "../clang/test/CodeGenHLSL/builtins/asuint-splitdouble.hlsl" +target datalayout

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

2024-09-27 Thread Erich Keane via cfe-commits
@@ -3141,6 +3148,10 @@ def warn_attribute_ignored_no_calls_in_stmt: Warning< "statement">, InGroup; +def warn_attribute_needs_aggregate : Warning< erichkeane wrote: just a quick grepping (and I gave up pretty quickly :D : `err_anyx86_interrupt_attribute`

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

2024-09-27 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/102040 >From 7ea9d3dbb6ff74ca3f7f9b9a0c589e4a0a3366f2 Mon Sep 17 00:00:00 2001 From: higher-performance Date: Mon, 5 Aug 2024 15:04:19 -0400 Subject: [PATCH 1/2] Add Clang attribute to ensure that fields are

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

2024-09-27 Thread Erich Keane via cfe-commits
https://github.com/erichkeane requested changes to this pull request. Marking 'request-changes' not as there are changes needed, but that I have concerns about the implementation that I have to spend some time in a debugger to assuage. https://github.com/llvm/llvm-project/pull/102040 _

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

2024-09-27 Thread Erich Keane via cfe-commits
@@ -4561,6 +4569,13 @@ static void TryConstructorInitialization(Sema &S, CXXConstructorDecl *CtorDecl = cast(Best->Function); if (Result != OR_Deleted) { +if (!IsListInit && Kind.getKind() == InitializationKind::IK_Default && erichkeane wrote: This is

[clang] Add clang/docs/FunctionEffectAnalysis.rst. (PR #109855)

2024-09-27 Thread Chris Apple via cfe-commits
@@ -0,0 +1,503 @@ + +Function Effect Analysis + + +Introduction + + +Clang Function Effect Analysis is a C++ language extension which can warn about "unsafe" +constructs. The feature is currently tailored for the Perform

[clang] [Clang] Add __builtin_(elementwise|reduce)_(max|min)imum (PR #110198)

2024-09-27 Thread Francis Visoiu Mistrih via cfe-commits
https://github.com/francisvm updated https://github.com/llvm/llvm-project/pull/110198 >From 511cfd942c98c1eaab31ca1e447d8a2d1f545f55 Mon Sep 17 00:00:00 2001 From: Francis Visoiu Mistrih Date: Thu, 26 Sep 2024 18:05:09 -0700 Subject: [PATCH] [Clang] Add __builtin_elementwise|reduce_max|minimum

[libcxx] [libcxxabi] [libunwind] [libc++abi][libunwind] Run c++abi and unwind tests against a fake install root (PR #110171)

2024-09-27 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/110171 >From f6c1590f9513ecab8fe0ea6db8b5367513ce95a1 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Thu, 26 Sep 2024 17:09:32 -0400 Subject: [PATCH 1/2] [libc++abi][libunwind] Run c++abi and unwind tests against a

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

2024-09-27 Thread Erich Keane via cfe-commits
@@ -4561,6 +4569,13 @@ static void TryConstructorInitialization(Sema &S, CXXConstructorDecl *CtorDecl = cast(Best->Function); if (Result != OR_Deleted) { +if (!IsListInit && Kind.getKind() == InitializationKind::IK_Default && erichkeane wrote: Ah,yes.

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

2024-09-27 Thread via cfe-commits
@@ -2837,6 +2837,10 @@ bool QualType::hasNonTrivialToPrimitiveCopyCUnion(const RecordDecl *RD) { return RD->hasNonTrivialToPrimitiveCopyCUnion(); } +bool QualType::hasUninitializedExplicitInitFields(const RecordDecl *RD) { higher-performance wrote: Done.

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

2024-09-27 Thread via cfe-commits
@@ -4561,6 +4569,13 @@ static void TryConstructorInitialization(Sema &S, CXXConstructorDecl *CtorDecl = cast(Best->Function); if (Result != OR_Deleted) { +if (!IsListInit && Kind.getKind() == InitializationKind::IK_Default && higher-performance wrote:

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

2024-09-27 Thread via cfe-commits
@@ -4561,6 +4569,13 @@ static void TryConstructorInitialization(Sema &S, CXXConstructorDecl *CtorDecl = cast(Best->Function); if (Result != OR_Deleted) { +if (!IsListInit && Kind.getKind() == InitializationKind::IK_Default && higher-performance wrote:

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

2024-09-27 Thread via cfe-commits
@@ -4561,6 +4569,13 @@ static void TryConstructorInitialization(Sema &S, CXXConstructorDecl *CtorDecl = cast(Best->Function); if (Result != OR_Deleted) { +if (!IsListInit && Kind.getKind() == InitializationKind::IK_Default && higher-performance wrote:

[clang] [ItaniumMangle] Use mangleType instead of mangleNameOrStandardSubstitution in mangleCXXCtorVTable function (PR #109970)

2024-09-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/109970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-27 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s + +namespace GH49093 { + class B { + public: +static int a() { return 0; } // expected-note {{member is declared here}} +decltype(a< 0 >(0)) test;// expected-error {{member 'a' used before its

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

2024-09-27 Thread via cfe-commits
https://github.com/higher-performance edited https://github.com/llvm/llvm-project/pull/102040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Fix installation w/ ENABLE_RUNTIME_SUBNORMAL (PR #109926)

2024-09-27 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert approved this pull request. That seems sensible to me. The absolute path also makes sense because target properties could be requested from a different directory, and then a relative path wouldn't work anymore. https://github.com/llvm/llvm-project/pull/109926 __

[clang] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -0,0 +1,187 @@ +//===-- amdgpuintrin.h - AMDPGU intrinsic functions ---===// +// +// 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] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-27 Thread Matheus Izvekov via cfe-commits
@@ -10581,6 +10581,47 @@ bool clang::isBetterOverloadCandidate( auto *Guide1 = dyn_cast_or_null(Cand1.Function); auto *Guide2 = dyn_cast_or_null(Cand2.Function); if (Guide1 && Guide2) { + // -- F1 and F2 are generated from class template argument deduction +

[clang] ea568a9 - [libclang/python] Improve test coverage (#109846)

2024-09-27 Thread via cfe-commits
Author: Jannick Kremer Date: 2024-09-27T18:56:55+02:00 New Revision: ea568a93ce78d150957cf8afc7159596cd85d912 URL: https://github.com/llvm/llvm-project/commit/ea568a93ce78d150957cf8afc7159596cd85d912 DIFF: https://github.com/llvm/llvm-project/commit/ea568a93ce78d150957cf8afc7159596cd85d912.diff

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-27 Thread Matheus Izvekov via cfe-commits
@@ -1186,17 +1281,34 @@ void DeclareImplicitDeductionGuidesForTypeAlias( NewParam->setScopeInfo(0, I); FPTL.setParam(I, NewParam); } - auto *Transformed = cast(buildDeductionGuide( - SemaRef, AliasTemplate, /*TemplateParams=*/nullptr, + +

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-27 Thread Matheus Izvekov via cfe-commits
@@ -11723,6 +11764,40 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } +// Errors in deduction guides from inherited constructors +// will present as substitution failures in the mapping +// partial specialization

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-27 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 97169bf - Update contact email address

2024-09-27 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-09-27T09:29:10-07:00 New Revision: 97169bf086131d49e0d700859c6a44c09ed5 URL: https://github.com/llvm/llvm-project/commit/97169bf086131d49e0d700859c6a44c09ed5 DIFF: https://github.com/llvm/llvm-project/commit/97169bf086131d49e0d700859c6a44c09ed5.diff

[clang] [clang][test] add testing for the AST matcher reference (PR #110258)

2024-09-27 Thread Julian Schmidt via cfe-commits
5chmidti wrote: The buildkite failure is unrelated https://github.com/llvm/llvm-project/pull/110258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][test] add testing for the AST matcher reference (PR #110258)

2024-09-27 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti closed https://github.com/llvm/llvm-project/pull/110258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-27 Thread Matheus Izvekov via cfe-commits
@@ -2007,6 +2022,21 @@ class CXXDeductionGuideDecl : public FunctionDecl { /// this is an implicit deduction guide. CXXConstructorDecl *getCorrespondingConstructor() const { return Ctor; } + /// Get the deduction guide from which this deduction guide was generated, + ///

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

2024-09-27 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/102040 >From 7ea9d3dbb6ff74ca3f7f9b9a0c589e4a0a3366f2 Mon Sep 17 00:00:00 2001 From: higher-performance Date: Mon, 5 Aug 2024 15:04:19 -0400 Subject: [PATCH 1/2] Add Clang attribute to ensure that fields are

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

2024-09-27 Thread via cfe-commits
@@ -6457,6 +6474,19 @@ void InitializationSequence::InitializeFrom(Sema &S, } } + if (!S.getLangOpts().CPlusPlus && + Kind.getKind() == InitializationKind::IK_Default) { +RecordDecl *Rec = DestType->getAsRecordDecl(); +if (Rec && Rec->hasUninitializedExplic

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-09-27 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,63 @@ +; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s + +; ModuleID = '../clang/test/CodeGenHLSL/builtins/asuint-splitdouble.hlsl' +source_filename = "../clang/test/CodeGenHLSL/builtins/asuint-splitdouble.hlsl" +target datalayout

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

2024-09-27 Thread Erich Keane via cfe-commits
@@ -6457,6 +6472,18 @@ void InitializationSequence::InitializeFrom(Sema &S, } } + if (!S.getLangOpts().CPlusPlus && + Kind.getKind() == InitializationKind::IK_Default) { +RecordDecl *Rec = DestType->getAsRecordDecl(); +if (Rec && Rec->hasUninitializedExplic

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

2024-09-27 Thread via cfe-commits
@@ -1472,3 +1472,56 @@ template struct Outer { }; }; Outer::Inner outerinner; + +void aggregate() { + struct NonAgg { +NonAgg() { } +[[clang::requires_explicit_initialization]] int f; // expected-warning {{attribute is ignored}} + }; + NonAgg nonagg; + (void)non

[clang] [Clang] Add __builtin_(elementwise|reduce)_(max|min)imum (PR #110198)

2024-09-27 Thread Francis Visoiu Mistrih via cfe-commits
https://github.com/francisvm updated https://github.com/llvm/llvm-project/pull/110198 >From e42a4a9769d3448d070e15e638f4be8c16694d0b Mon Sep 17 00:00:00 2001 From: Francis Visoiu Mistrih Date: Thu, 26 Sep 2024 18:05:09 -0700 Subject: [PATCH] [Clang] Add __builtin_elementwise|reduce_max|minimum

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

2024-09-27 Thread via cfe-commits
@@ -4561,6 +4569,13 @@ static void TryConstructorInitialization(Sema &S, CXXConstructorDecl *CtorDecl = cast(Best->Function); if (Result != OR_Deleted) { +if (!IsListInit && Kind.getKind() == InitializationKind::IK_Default && +DestRecordDecl != nullptr && DestR

[clang] 787a6d5 - [nvlink-wrapper] Remove use of symlinks

2024-09-27 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2024-09-27T12:05:56-05:00 New Revision: 787a6d57f95ff6eaee8df01392900a6eea512930 URL: https://github.com/llvm/llvm-project/commit/787a6d57f95ff6eaee8df01392900a6eea512930 DIFF: https://github.com/llvm/llvm-project/commit/787a6d57f95ff6eaee8df01392900a6eea512930.diff

[clang] [HLSL] Implementation of the elementwise fmod builtin (PR #108849)

2024-09-27 Thread Zhengxing li via cfe-commits
https://github.com/lizhengxing updated https://github.com/llvm/llvm-project/pull/108849 >From 96a8f95b6e6cc9b59c856afc3297454ede241487 Mon Sep 17 00:00:00 2001 From: Zhengxing Li Date: Fri, 13 Sep 2024 13:19:31 -0700 Subject: [PATCH] [HLSL] Implementation of the elementwise fmod builtin This c

[clang] [Clang] Add __builtin_(elementwise|reduce)_(max|min)imum (PR #110198)

2024-09-27 Thread Francis Visoiu Mistrih via cfe-commits
@@ -706,6 +706,12 @@ Unless specified otherwise operation(±0) = ±0 and operation(±infinity) = ±in representable values for the signed/unsigned integer type. T __builtin_elementwise_sub_sat(T x, T y) return the difference of x and

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

2024-09-27 Thread via cfe-commits
@@ -2302,6 +2302,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] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-09-27 Thread Krzysztof Parzyszek via cfe-commits
kparzysz wrote: > Yeah I was actually wondering if I should go for something like this: > > ```c > #ifdef __NVPTX__ > uint32_t nvptx_get_thread_id_x() { return __nvvm_ptx_read_sreg_tid_x(); } > #define IMPL nvptx > #endif > uint32_t gpu_get_thread_id_x() { return ##IMPL##_get_thread_id_x(); } >

[clang] [HLSL] Use HLSLToolChain for Vulkan (PR #110306)

2024-09-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Steven Perron (s-perron) Changes The options are not translated correctly when targeting Vulkan using the dxc driver mode. Resuing the translator used for HLSL. Fixes problem 2 in https://github.com/llvm/llvm-project/issues/108567. --- F

[clang] [cuda][HIP] `__constant__` should imply constant (PR #110182)

2024-09-27 Thread Artem Belevich via cfe-commits
Artem-B wrote: > In this case, _ZL4cxxx does not have externally_initialized . If this patch > does not remove externally_initialized, probably this constant propagation > won't happen. Indeed, unoptimized code shows that `cxxx` has no `externally_initialized`, only `constant`. If we keep e

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-09-27 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,63 @@ +; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s + +; ModuleID = '../clang/test/CodeGenHLSL/builtins/asuint-splitdouble.hlsl' farzonl wrote: delete lines 3 through 6. https://github.com/llvm/llvm-project/p

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-09-27 Thread Farzon Lotfi via cfe-commits
@@ -264,6 +265,31 @@ class OpLowerer { return lowerToBindAndAnnotateHandle(F); } + Error replaceSplitDoubleCallUsages(CallInst *Intrin, CallInst *Op) { +IRBuilder<> &IRB = OpBuilder.getIRB(); + +for (Use &U : make_early_inc_range(Intrin->uses())) { + if (au

[clang] [HLSL] Array by-value assignment (PR #109323)

2024-09-27 Thread Chris B via cfe-commits
@@ -0,0 +1,113 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s --enable-var-scope + +// CHECK-LABEL: define void {{.*}}arr_assign1 +// CHECK: [[Arr:%.*]] = alloca [2 x i32], align 4 +// CHECK: [[Arr2:%.*]] = all

[clang] [libcxxabi] [clang][ItaniumMangle] Mangle friend function templates with a constr… (PR #110247)

2024-09-27 Thread Utkarsh Saxena via cfe-commits
@@ -704,6 +704,15 @@ ItaniumMangleContextImpl::getEffectiveDeclContext(const Decl *D) { return D->getLexicalDeclContext()->getRedeclContext(); } + if (const auto *FTD = dyn_cast(D)) { +// Member-like constrained friends are mangled as if they were members of

[clang] [libcxxabi] [clang][ItaniumMangle] Mangle friend function templates with a constr… (PR #110247)

2024-09-27 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/110247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][clang] Fix std::tm etc. mangling on Solaris (PR #106353)

2024-09-27 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The code assumes standard substitutions are not themselves substitutable. So you probably need to call mangleSubstitution/addSubstitution explicitly in the code. mangleSubstitution checks if there's an existing substitution, addSubstitution appends to the list of substi

[clang] [rtsan] Update docs to include run-time flags (PR #110296)

2024-09-27 Thread via cfe-commits
@@ -84,6 +84,75 @@ non-zero exit code. #14 0x0001958960dc () #15 0x2f557ffc () +Run-time flags +-- + +RealtimeSanitizer supports a number of run-time flags, which can be specified in the ``RTSAN_OPTIONS`` environment variable: + +.. code-block::

[clang] [cuda][[HIP] `__constant__` should imply constant (PR #110182)

2024-09-27 Thread Alex Voicu via cfe-commits
AlexVlx wrote: @yxsamliu beat me to it. The problem here is that the example illustrates language level const on a variable with internal linkage (which is mandatory for `__constant__` variables in non-RDC compilation AFAICT from 17.5.24.1) and we don't set externally_initialized on that, whic

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

2024-09-27 Thread Vlad Serebrennikov via cfe-commits
@@ -2454,7 +2480,7 @@ def element_type(self): If accessed on a type that is not an array, complex, or vector type, an exception will be raised. """ -result = conf.lib.clang_getElementType(self) +result = Type.from_result(conf.lib.clang_ge

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

2024-09-27 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum closed https://github.com/llvm/llvm-project/pull/105490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

2024-09-27 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/105490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-09-27 Thread Lei Wang via cfe-commits
https://github.com/wlei-llvm updated https://github.com/llvm/llvm-project/pull/109837 >From 436ab3bfb3d7f1978ba1598ec7d3ca006706cbd3 Mon Sep 17 00:00:00 2001 From: wlei Date: Sun, 22 Sep 2024 20:23:20 -0700 Subject: [PATCH] [InstrPGO] Instrument sampling profile based cold function --- clang/

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-27 Thread Зишан Мирза via cfe-commits
zimirza wrote: That is correct. Unfortunately, I did not compare my implementation with glibc's `ctime`. So, I created a new issue for this. Hope it is ok. https://github.com/llvm/llvm-project/pull/107285 ___ cfe-commits mailing list cfe-commits@lists

<    1   2   3   4   5   >