[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

2024-09-04 Thread Alex Voicu via cfe-commits
@@ -188,6 +192,41 @@ void SPIRVTargetCodeGenInfo::setCUDAKernelCallingConvention( } } +llvm::SyncScope::ID +SPIRVTargetCodeGenInfo::getLLVMSyncScopeID(const LangOptions &, SyncScope Scope, + llvm::AtomicOrdering, +

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-09-04 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/70976 >From a91f499900d4cea4804833d004b6c4e54a7d8b15 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sun, 3 Sep 2023 17:26:28 -0700 Subject: [PATCH 1/9] [clang] Extend diagnose_if to accept more detailed warni

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-09-04 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/70976 >From a91f499900d4cea4804833d004b6c4e54a7d8b15 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sun, 3 Sep 2023 17:26:28 -0700 Subject: [PATCH 01/10] [clang] Extend diagnose_if to accept more detailed war

[clang] [llvm] [AArch64] Implement intrinsics for SME2 FAMIN/FAMAX (PR #99063)

2024-09-04 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/99063 >From f85636d61ecd16fdc88317c53ddd00558e37f99a Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Tue, 16 Jul 2024 16:49:04 +0100 Subject: [PATCH] [AArch64] Implement intrinsics for SME2 FAMIN/FAMAX Th

[clang] [llvm] [SPARC] Align i128 to 16 bytes in SPARC datalayouts (PR #106951)

2024-09-04 Thread Nikita Popov via cfe-commits
nikic wrote: > I guess this is a breaking change? Yes, but as previously discussed, it's acceptable breakage. > Following the discussion in the linked revision it looks like this also needs > some AutoUpgrade changes. Yes, this should be handled in UpgradeDataLayoutString(). https://github.

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-09-04 Thread Timm Baeder via cfe-commits
@@ -0,0 +1,118 @@ +// RUN: %clang_cc1 -std=c++23 -verify %s + +using size_t = decltype(sizeof(0)); + +namespace std { +struct type_info { + const char* name() const noexcept(true); +}; +} + +template +constexpr size_t array_size(T (&)[N]) { + return N; +} + +void use_array(int

[clang] Disallow btf_type_tag in C++ mode (PR #107238)

2024-09-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes This was always intended to be disallowed in C++ (see the definition in Attr.td), but failed to add the correct checking code in SemaType.cpp to ensure it was rejected. Fixes #106864 --- Full diff: h

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in templat… (PR #106730)

2024-09-04 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov updated https://github.com/llvm/llvm-project/pull/106730 >From a46885df62ff64f355abb010f778d84309acd10f Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Fri, 23 Aug 2024 17:27:26 +0200 Subject: [PATCH 1/3] [Clang] Add __type_list_dedup builtin to deduplicate

[clang] [DebugInfo] Make a test more robust (PR #106463)

2024-09-04 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/106463 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-SATCVT-DS new instructions. (PR #102592)

2024-09-04 Thread Malay Sanghi via cfe-commits
https://github.com/MalaySanghi deleted https://github.com/llvm/llvm-project/pull/102592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in templat… (PR #106730)

2024-09-04 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov updated https://github.com/llvm/llvm-project/pull/106730 >From a46885df62ff64f355abb010f778d84309acd10f Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Fri, 23 Aug 2024 17:27:26 +0200 Subject: [PATCH 1/3] [Clang] Add __type_list_dedup builtin to deduplicate

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in templat… (PR #106730)

2024-09-04 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov ready_for_review https://github.com/llvm/llvm-project/pull/106730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add nuw attribute to GEPs (PR #105496)

2024-09-04 Thread Nikita Popov via cfe-commits
nikic wrote: This should be ready to re-apply now. https://github.com/llvm/llvm-project/pull/105496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-04 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/106730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-04 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/106730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clangd Author: Ilya Biryukov (ilya-biryukov) Changes This allows to deduplicate the type lists efficiently in C++. It is possible to achieve the same effect via template metaprogramming, but performance of the res

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-04 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/106730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 028174a - [DebugInfo] Make a test more robust (#106463)

2024-09-04 Thread via cfe-commits
Author: Paul T Robinson Date: 2024-09-04T09:19:41-04:00 New Revision: 028174aa2c3a9447acae45b5f89e652b74d1 URL: https://github.com/llvm/llvm-project/commit/028174aa2c3a9447acae45b5f89e652b74d1 DIFF: https://github.com/llvm/llvm-project/commit/028174aa2c3a9447acae45b5f89e652b74d1.dif

[clang] [clang] Emit nuw GEPs for array subscript expressions (PR #103088)

2024-09-04 Thread Nikita Popov via cfe-commits
nikic wrote: Can this be closed in favor of https://github.com/llvm/llvm-project/pull/105496? https://github.com/llvm/llvm-project/pull/103088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [DebugInfo] Make a test more robust (PR #106463)

2024-09-04 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/106463 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-04 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: I still need to add code that preserves source locations for template arguments and tests for it, but otherwise this is ready for review and I would like to get some initial feedback. The RFC did not get any comments so far, but also happy to discuss the general design th

[clang] [Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (PR #104458)

2024-09-04 Thread Krystian Stasiowski via cfe-commits
@@ -7981,7 +7969,7 @@ ExprResult Sema::ActOnStartCXXMemberReference(Scope *S, Expr *Base, SmallVector OperatorArrows; CTypes.insert(Context.getCanonicalType(BaseType)); -while (BaseType->isRecordType()) { +while (BaseType->getAsRecordDecl()) {

[clang] [Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (PR #104458)

2024-09-04 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/104458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][NVPTX] Add a warning that device debug info does not work with optimizations (PR #65327)

2024-09-04 Thread Georgi Mirazchiyski via cfe-commits
https://github.com/GeorgeWeb closed https://github.com/llvm/llvm-project/pull/65327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][NVPTX] Add a warning that device debug info does not work with optimizations (PR #65327)

2024-09-04 Thread Georgi Mirazchiyski via cfe-commits
GeorgeWeb wrote: Agreed not to go this path, hence closing this PR. Thanks for reviews. https://github.com/llvm/llvm-project/pull/65327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

2024-09-04 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LGTM! Thanks! https://github.com/llvm/llvm-project/pull/107213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LV] Mask off possibly aliasing vector lanes (PR #100579)

2024-09-04 Thread Sam Tebbs via cfe-commits
@@ -2778,6 +2808,60 @@ void VPWidenPointerInductionRecipe::print(raw_ostream &O, const Twine &Indent, } #endif +void VPAliasLaneMaskRecipe::execute(VPTransformState &State) { + IRBuilderBase Builder = State.Builder; + Value *SinkValue = State.get(getSinkValue(), 0, true); +

[clang] [llvm] [LV] Mask off possibly aliasing vector lanes (PR #100579)

2024-09-04 Thread Sam Tebbs via cfe-commits
@@ -428,6 +431,85 @@ Value *VPInstruction::generatePerPart(VPTransformState &State, unsigned Part) { {PredTy, ScalarTC->getType()}, {VIVElem0, ScalarTC}, nullptr, Name); } + case VPInstruction::AliasLaneM

[clang] Disallow btf_type_tag in C++ mode (PR #107238)

2024-09-04 Thread Aaron Ballman via cfe-commits
@@ -6490,6 +6490,15 @@ static void HandleBTFTypeTagAttribute(QualType &Type, const ParsedAttr &Attr, TypeProcessingState &State) { Sema &S = State.getSema(); + // This attribute is only supported in C. + // FIXME: we should implement

[clang] [clang] Emit nuw GEPs for array subscript expressions (PR #103088)

2024-09-04 Thread Hari Limaye via cfe-commits
https://github.com/hazzlim closed https://github.com/llvm/llvm-project/pull/103088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Emit nuw GEPs for array subscript expressions (PR #103088)

2024-09-04 Thread Hari Limaye via cfe-commits
hazzlim wrote: > Can this be closed in favor of #105496? Yes good point - will close this and open a PR to Reland #105496. https://github.com/llvm/llvm-project/pull/103088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-09-04 Thread Chris B via cfe-commits
@@ -249,4 +249,8 @@ FIELD(HasDeclaredCopyAssignmentWithConstParam, 1, MERGE_OR) /// base classes or fields have a no-return destructor FIELD(IsAnyDestructorNoReturn, 1, NO_MERGE) +/// Whether the record type is intangible (if any base classes or fields have +/// type that is i

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-09-04 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. Overall looks good. I think that in the places outside SemaHLSL we should try to refer to the trait as `HLSLIntangible` to make it clear that it is a language-mode specific feature. We don't need to repeat HLSL a million times in SemaHL

[clang] [llvm] [LV] Mask off possibly aliasing vector lanes (PR #100579)

2024-09-04 Thread Florian Hahn via cfe-commits
@@ -8520,7 +8561,29 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range) { // When not folding the tail, we know that the induction increment will not // overflow. bool HasNUW = Style == TailFoldingStyle::None; - addCanonicalIVRecipes(*Plan, Legal->

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

2024-09-04 Thread Richard Smith via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx11 -pedantic -std=c++11 %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx14 -pedantic -std=c++14 %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx17 -pedantic -std=c++17 %s +// RUN: %clang_cc1 -

[clang] Disallow btf_type_tag in C++ mode (PR #107238)

2024-09-04 Thread Erich Keane via cfe-commits
@@ -6490,6 +6490,15 @@ static void HandleBTFTypeTagAttribute(QualType &Type, const ParsedAttr &Attr, TypeProcessingState &State) { Sema &S = State.getSema(); + // This attribute is only supported in C. + // FIXME: we should implement

[clang] Thread Safety Analysis: Differentiate between lock sets at real join points and expected/actual sets at function end (PR #105526)

2024-09-04 Thread via cfe-commits
github-actions[bot] wrote: @malek203 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 build

[clang] e64ef63 - Thread Safety Analysis: Differentiate between lock sets at real join points and expected/actual sets at function end (#105526)

2024-09-04 Thread via cfe-commits
Author: Malek Ben Slimane Date: 2024-09-04T16:18:11+02:00 New Revision: e64ef634bbd940dfaae23d9fb43e6385014ffd10 URL: https://github.com/llvm/llvm-project/commit/e64ef634bbd940dfaae23d9fb43e6385014ffd10 DIFF: https://github.com/llvm/llvm-project/commit/e64ef634bbd940dfaae23d9fb43e6385014ffd10.d

[clang] Thread Safety Analysis: Differentiate between lock sets at real join points and expected/actual sets at function end (PR #105526)

2024-09-04 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert closed https://github.com/llvm/llvm-project/pull/105526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-SATCVT-DS new instructions. (PR #102592)

2024-09-04 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,447 @@ +/*===--- avx10_2satcvtdsintrin.h - AVX512SATCVTDS intrinsics === + * + * 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] [llvm] [X86][AVX10.2] Support AVX10.2-SATCVT-DS new instructions. (PR #102592)

2024-09-04 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,183 @@ +// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=i386-unknown-unknown -target-feature +avx10.2-512 -emit-llvm -o - | FileCheck %s + +#include +#include + +int test_mm_cvttssd_i32(__m128d __A) { + // CHECK-LABEL: @test_mm_cvttssd_i3

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

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

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

2024-09-04 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 commented: Thanks. This looks quite useful. Since this is not limited to a hardcoded set of types/stl-containers, this is a substantial change in the behaviour of general `Owner types` and warrants extra documentation both in GSL analysis docs and ReleaseNotes. https

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

2024-09-04 Thread Utkarsh Saxena via cfe-commits
@@ -363,10 +363,14 @@ static bool implicitObjectParamIsLifetimeBound(const FunctionDecl *FD) { if (ATL.getAttrAs()) return true; } - return isNormalAsisgnmentOperator(FD); } +bool isFirstTemplateArgumentGSLPointer(const TemplateArgumentList &TAs) { + return

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

2024-09-04 Thread Utkarsh Saxena via cfe-commits
@@ -470,10 +474,24 @@ static void visitFunctionCallArguments(IndirectLocalPath &Path, Expr *Call, VisitGSLPointerArg(Callee, Args[0], !Callee->getReturnType()->isReferenceType()); } else { -if (auto *CCE = dyn_cast(Call); -

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

2024-09-04 Thread Utkarsh Saxena via cfe-commits
@@ -499,3 +518,28 @@ std::string_view test2(int i, std::optional a) { return std::move(a.value()); } } + +namespace GH100526 { +void test() { + std::vector t1 = {std::string()}; // expected-warning {{object backing the pointer will be destroyed at the end}} ---

[clang] [clang] Diagnose dangling issues for the "Container" case. (PR #107213)

2024-09-04 Thread Utkarsh Saxena via cfe-commits
@@ -470,10 +474,24 @@ static void visitFunctionCallArguments(IndirectLocalPath &Path, Expr *Call, VisitGSLPointerArg(Callee, Args[0], !Callee->getReturnType()->isReferenceType()); } else { -if (auto *CCE = dyn_cast(Call); -

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-SATCVT-DS new instructions. (PR #102592)

2024-09-04 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,183 @@ +// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=i386-unknown-unknown -target-feature +avx10.2-512 -emit-llvm -o - | FileCheck %s phoebewang wrote: Remoe `-unknown-unknown` and add `-triple=x86_64` https://github.co

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-SATCVT-DS new instructions. (PR #102592)

2024-09-04 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,220 @@ +// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=i386-unknown-unknown -target-feature +avx10.2-256 -emit-llvm -o - | FileCheck %s phoebewang wrote: Remoe `-unknown-unknown` and add `-triple=x86_64` https://github.co

[clang] Disallow btf_type_tag in C++ mode (PR #107238)

2024-09-04 Thread Aaron Ballman via cfe-commits
@@ -6490,6 +6490,15 @@ static void HandleBTFTypeTagAttribute(QualType &Type, const ParsedAttr &Attr, TypeProcessingState &State) { Sema &S = State.getSema(); + // This attribute is only supported in C. + // FIXME: we should implement

[clang] [Clang] [NFC] Introduce `DynamicRecursiveASTVisitor` (PR #105195)

2024-09-04 Thread Nikita Popov via cfe-commits
nikic wrote: > To see how effective this would be, a lot of visitors all over the codebase > have been migrated to use the dynamic visitor. The results of this refactor > can be viewed > [here](https://llvm-compile-time-tracker.com/compare.php?from=27e5f505e5eee3da27c1515d6ed95d66fbe543ea&to=8

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

2024-09-04 Thread via cfe-commits
@@ -1472,3 +1472,25 @@ template struct Outer { }; }; Outer::Inner outerinner; + +void aggregate() { + struct B { +[[clang::explicit_init]] int f1; + }; + + struct S : B { // expected-warning {{uninitialized}} +int f2; +int f3 [[clang::explicit_init]]; + }; + +

[clang] [Clang] [Driver] Support `-fjmc` for `*-windows-msvc` target in non cl driver modes (PR #107177)

2024-09-04 Thread via cfe-commits
https://github.com/zmodem approved this pull request. Looks good to me. https://github.com/llvm/llvm-project/pull/107177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Adjust modulemap to mark mm3dnow as textual header. (PR #107155)

2024-09-04 Thread James Y Knight via cfe-commits
jyknight wrote: The only impact is that any modular header which includes this file will end up with a definition of the header guard, instead of importing it, right? It's not clear to me why it's useful to care about that? (I totally do understand worrying about cases which result in e.g. hav

[clang] Disallow btf_type_tag in C++ mode (PR #107238)

2024-09-04 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/107238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Disallow btf_type_tag in C++ mode (PR #107238)

2024-09-04 Thread Erich Keane via cfe-commits
@@ -225,6 +225,11 @@ Attribute Changes in Clang more cases where the returned reference outlives the object. (#GH100567) +- Now correctly diagnosing use of ``btf_type_tag`` in C++ and ignoring it; this erichkeane wrote: ```suggestion - Clang now correctly

[clang] Disallow btf_type_tag in C++ mode (PR #107238)

2024-09-04 Thread Erich Keane via cfe-commits
@@ -225,6 +225,11 @@ Attribute Changes in Clang more cases where the returned reference outlives the object. (#GH100567) +- Now correctly diagnosing use of ``btf_type_tag`` in C++ and ignoring it; this + attribute is a C-only attribute, and was causing crashes with templa

[clang] [clang][C23] Claim N3030 Enhancements to Enumerations supported (PR #107260)

2024-09-04 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,95 @@ +// RUN: %clang_cc1 -verify -triple x86_64-unknown-linux-gnu -fsyntax-only --embed-dir=%S/Inputs -std=c23 %s -pedantic -Wall + +#include + +enum us : unsigned short { + us_max = USHRT_MAX, + us_violation, // expected-error {{enumerator value 65536 is not rep

[clang] [clang][ExtractAPI] Handle AttributedType fragments transparently (PR #107262)

2024-09-04 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/107262 rdar://131958623 >From 71011c910b218c4817872dee91499e60bd771e07 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Tue, 3 Sep 2024 16:27:36 +0100 Subject: [PATCH] [clang][ExtractAPI] Handle Attributed

[clang] [clang][ExtractAPI] Handle AttributedType fragments transparently (PR #107262)

2024-09-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel Grumberg (daniel-grumberg) Changes rdar://131958623 --- Full diff: https://github.com/llvm/llvm-project/pull/107262.diff 2 Files Affected: - (modified) clang/lib/ExtractAPI/DeclarationFragments.cpp (+11) - (added) clang/test/Ext

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2024-09-04 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/107168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2024-09-04 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/107168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [TableGen] Add const variants of accessors for backend (PR #106658)

2024-09-04 Thread Rahul Joshi via cfe-commits
@@ -189,7 +189,7 @@ static StringRef NormalizeGNUAttrSpelling(StringRef AttrSpelling) { typedef std::vector> ParsedAttrMap; -static ParsedAttrMap getParsedAttrList(const RecordKeeper &Records, jurahul wrote: I propose the following next steps (once this is

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2024-09-04 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/107168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [TableGen] Add const variants of accessors for backend (PR #106658)

2024-09-04 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/106658 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Handle AttributedType fragments transparently (PR #107262)

2024-09-04 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/107262 >From 17a956e118879df9ce1431c41f580108b92b6784 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Tue, 3 Sep 2024 16:27:36 +0100 Subject: [PATCH] [clang][ExtractAPI] Handle AttributedType fragments tr

[clang] [llvm] [mlir] [TableGen] Add const variants of accessors for backend (PR #106658)

2024-09-04 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/106658 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Handle AttributedType fragments transparently (PR #107262)

2024-09-04 Thread via cfe-commits
https://github.com/QuietMisdreavus approved this pull request. https://github.com/llvm/llvm-project/pull/107262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Allow disabling of types from the command line (PR #107126)

2024-09-04 Thread Renaud Kauffmann via cfe-commits
Renaud-K wrote: I have been looking into this but long story short, but I am little pressed by time and was not planning on spending too much time on this. For the need that we have, it should be ok. https://github.com/llvm/llvm-project/pull/107126

[clang] Reland "[clang] Add nuw attribute to GEPs (#105496)" (PR #107257)

2024-09-04 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LG if CI is happy. https://github.com/llvm/llvm-project/pull/107257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 697bc74 - Allow disabling of types from the command line (#107126)

2024-09-04 Thread via cfe-commits
Author: Renaud Kauffmann Date: 2024-09-04T08:59:55-07:00 New Revision: 697bc748f97736b294dd85b8f78530d023557b72 URL: https://github.com/llvm/llvm-project/commit/697bc748f97736b294dd85b8f78530d023557b72 DIFF: https://github.com/llvm/llvm-project/commit/697bc748f97736b294dd85b8f78530d023557b72.di

[clang] [flang] Allow disabling of types from the command line (PR #107126)

2024-09-04 Thread Renaud Kauffmann via cfe-commits
https://github.com/Renaud-K closed https://github.com/llvm/llvm-project/pull/107126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-04 Thread Greg Roth via cfe-commits
@@ -414,9 +414,20 @@ void CGHLSLRuntime::emitEntryFunction(const FunctionDecl *FD, void CGHLSLRuntime::setHLSLFunctionAttributes(const FunctionDecl *FD, llvm::Function *Fn) { - if (FD->isInExportDeclContext()) { -const String

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-04 Thread Greg Roth via cfe-commits
https://github.com/pow3clk commented: On my laptop account. I assure you it's who you think it is. https://github.com/llvm/llvm-project/pull/106588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-04 Thread Greg Roth via cfe-commits
https://github.com/pow3clk edited https://github.com/llvm/llvm-project/pull/106588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-04 Thread Greg Roth via cfe-commits
@@ -290,8 +290,6 @@ struct BuiltinTypeDeclBuilder { SourceLocation())); MethodDecl->setLexicalDeclContext(Record); MethodDecl->setAccess(AccessSpecifier::AS_public); -MethodDecl->addAttr(AlwaysInlineAttr::CreateImplicit(

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-04 Thread Greg Roth via cfe-commits
https://github.com/pow2clk updated https://github.com/llvm/llvm-project/pull/106588 >From 12253818bd47aa8c324f6222586965f356b11c90 Mon Sep 17 00:00:00 2001 From: Greg Roth Date: Wed, 24 Jul 2024 16:49:19 -0600 Subject: [PATCH 1/3] [HLSL] set alwaysinline on HLSL functions HLSL inlines all its

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-04 Thread Sarah Spall via cfe-commits
@@ -1544,6 +1604,30 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { return true; break; } + case Builtin::BI__builtin_hlsl_select: { spall wrote: I think it is slightly special. It is a template function, and t

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-04 Thread Greg Roth via cfe-commits
https://github.com/pow2clk updated https://github.com/llvm/llvm-project/pull/106588 >From 12253818bd47aa8c324f6222586965f356b11c90 Mon Sep 17 00:00:00 2001 From: Greg Roth Date: Wed, 24 Jul 2024 16:49:19 -0600 Subject: [PATCH 1/4] [HLSL] set alwaysinline on HLSL functions HLSL inlines all its

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-04 Thread Matt Arsenault via cfe-commits
@@ -1431,9 +1431,13 @@ Value *ScalarExprEmitter::EmitScalarCast(Value *Src, QualType SrcType, return Builder.CreateFPToUI(Src, DstTy, "conv"); } - if (DstElementTy->getTypeID() < SrcElementTy->getTypeID()) + if ((DstElementTy->is16bitFPTy() && SrcElementTy->is16bitFPT

[clang] [clang][Driver] Add a custom error option in multilib.yaml. (PR #105684)

2024-09-04 Thread Petr Hosek via cfe-commits
petrhosek wrote: This is just a nit, but is there a reason for calling this `FatalError` rather than just `Error`? To me "fatal" usually means something went seriously wrong, but in this case it's just the fact the combination of flags is not supported and in the driver we usually just refer t

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-04 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: The vector tests should still be added https://github.com/llvm/llvm-project/pull/89051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-04 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 ecd65e64e885b0fd2786ca99ea0c42d692275d91 fc22a5a9f2f9678393c563de87d8326112e5e0c9 --e

[clang] [flang] [flang][Driver] Preliminary support for -ftime-report (PR #107270)

2024-09-04 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 216ba6bc6c0d1b65543771420897f4d09beec704 2f4a8503c605f7401bf9312b59a72b6b3ccdbb7f --e

[clang] [MS] Put dllexported inline global initializers in a comdat (PR #107154)

2024-09-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running on `hip-vega20-0` while building `clang` at step 3 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/4907 Here is the relevant piece of the build log for

[clang] [flang] [flang][Driver] Preliminary support for -ftime-report (PR #107270)

2024-09-04 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/107270 >From 2f4a8503c605f7401bf9312b59a72b6b3ccdbb7f Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Wed, 4 Sep 2024 10:24:31 -0600 Subject: [PATCH 1/2] [flang][Driver] Preliminary support for -ftime-report The

[clang] [clang][Driver] Add a custom error option in multilib.yaml. (PR #105684)

2024-09-04 Thread Petr Hosek via cfe-commits
petrhosek wrote: I think `Error` and `Warning` would be more consistent actually, especially if `-Werror` also applied to `Warning`; ideally we would also have a custom warning type so you could do e.g. `-Wno-multilib-warning` to suppress these warnings. https://github.com/llvm/llvm-project/p

[clang] [Clang] [Draft] Implement P0588R1 capture rules (PR #105953)

2024-09-04 Thread Richard Smith via cfe-commits
@@ -281,7 +283,115 @@ namespace { return inherited::TraverseLambdaCapture(Lambda, C, Init); } }; -} + + + class CollectExpandedParameterPacksVisitor zygoloid wrote: As a general concern, I think various parts of our pack handling would be cleaner

[clang] [clang] Check inline defs when emitting speculative vtable (PR #100785)

2024-09-04 Thread Fabian Parzefall via cfe-commits
https://github.com/FPar updated https://github.com/llvm/llvm-project/pull/100785 >From 13f60e1835c2a5876fa873fc5b4087f942a90316 Mon Sep 17 00:00:00 2001 From: Fabian Parzefall Date: Fri, 26 Jul 2024 10:46:22 -0700 Subject: [PATCH 1/2] [clang] Check inline defs when emitting speculative vtable

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-04 Thread Erich Keane via cfe-commits
@@ -0,0 +1,1566 @@ +//=== SemaFunctionEffects.cpp - Sema handling of function effects -===// erichkeane wrote: I've had a hard time with the review of this file, so I haven't done a close look. Hopefully someone who understands this better than me has

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-04 Thread Erich Keane via cfe-commits
@@ -8392,6 +8397,20 @@ void ASTReader::InitializeSema(Sema &S) { NewOverrides.applyOverrides(SemaObj->getLangOpts()); } + if (!DeclsWithEffectsToVerify.empty()) { +for (GlobalDeclID ID : DeclsWithEffectsToVerify) { + Decl *D = GetDecl(ID); + FunctionEf

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-04 Thread Erich Keane via cfe-commits
@@ -0,0 +1,1566 @@ +//=== SemaFunctionEffects.cpp - Sema handling of function effects -===// +// +// 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: A

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-04 Thread Erich Keane via cfe-commits
@@ -4932,6 +4938,78 @@ class FunctionEffectsRef { void dump(llvm::raw_ostream &OS) const; }; +/// A mutable set of FunctionEffect::Kind. +class FunctionEffectKindSet { + // For now this only needs to be a bitmap. + constexpr static size_t EndBitPos = 8; + using KindBitsT

[clang] [llvm] [AMDGPU] Add target intrinsic for s_prefetch_data (PR #107133)

2024-09-04 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/107133 >From 000e16cbd27783be68afdd9952c65e58f4cd7040 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Tue, 3 Sep 2024 10:14:35 -0700 Subject: [PATCH 1/4] [AMDGPU] Add target intrinsic for s_prefetch_data -

[clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2024-09-04 Thread Daniil Fukalov via cfe-commits
https://github.com/dfukalov updated https://github.com/llvm/llvm-project/pull/106810 >From 0221e97459534f0f7396e7970663e1a4f1f98cca Mon Sep 17 00:00:00 2001 From: dfukalov Date: Sat, 31 Aug 2024 01:45:27 +0200 Subject: [PATCH 1/3] [NFC] Add explicit #include llvm-config.h where its macros are

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-09-04 Thread via cfe-commits
goldsteinn wrote: ping4 @nikic https://github.com/llvm/llvm-project/pull/91101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-09-04 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

[clang] [llvm] [AMDGPU] Add target intrinsic for s_prefetch_data (PR #107133)

2024-09-04 Thread Stanislav Mekhanoshin via cfe-commits
@@ -2689,6 +2689,12 @@ def int_amdgcn_global_load_tr_b128 : AMDGPULoadIntrinsic; def int_amdgcn_wave_id : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [NoUndef, IntrNoMem, IntrSpeculatable]>; +def int_amdgcn_s_prefetch_data : + Intrinsic<[], [llvm_anyptr_ty, llvm_i32_ty], ---

[clang] [llvm] [AArch64] Implement NEON vamin/vamax intrinsics (PR #99041)

2024-09-04 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/99041 >From 886c48dd7efa227f8605bfafef4204cefbb75d6e Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Mon, 15 Jul 2024 17:50:43 +0100 Subject: [PATCH 1/3] [AArch64] Implement NEON vamin/vamax intrinsics Th

[clang] [clang] Check inline defs when emitting speculative vtable (PR #100785)

2024-09-04 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. https://github.com/llvm/llvm-project/pull/100785 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   >