[clang] Fix double-quotes in diagnostic when attempting to access a ext_vector of bools (PR #118186)

2024-12-06 Thread via cfe-commits
@@ -1655,8 +1655,10 @@ static ExprResult LookupMemberExpr(Sema &S, LookupResult &R, // We disallow element access for ext_vector_type bool. There is no way to // materialize a reference to a vector element as a pointer (each element is // one bit in the vector).

[clang] [llvm] [SystemZ] Add support for __builtin_setjmp and __builtin_longjmp (PR #116642)

2024-12-06 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand commented: One last comment, then it looks good to go for me. Thanks! https://github.com/llvm/llvm-project/pull/116642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [Serialization] Migrate away from PointerUnion::{is,get} (NFC) (PR #118948)

2024-12-06 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/118948 Note that PointerUnion::{is,get} have been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast I'm not touching

[clang] [Serialization] Migrate away from PointerUnion::{is,get} (NFC) (PR #118948)

2024-12-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::{is,get} have been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast

[clang] [llvm] [AArch64] Implement intrinsics for FP8 FCVT/FCVTN/BFCVT (PR #118025)

2024-12-06 Thread via cfe-commits
https://github.com/CarolineConcatto approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/118025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Reland "[flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv" (PR #118933)

2024-12-06 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Thanks for your patience and for bringing this back! https://github.com/llvm/llvm-project/pull/118933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [flang] [clang][driver] Special care for linker flags in config files (PR #117573)

2024-12-06 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm updated https://github.com/llvm/llvm-project/pull/117573 >From 65958806ff828cb0f41a2587e50abe0d221ae88c Mon Sep 17 00:00:00 2001 From: Pawel Osmialowski Date: Mon, 25 Nov 2024 14:46:55 + Subject: [PATCH] [clang][driver] Special care for linker flags in config f

[clang] [flang] [clang][driver] Special care for linker flags in config files (PR #117573)

2024-12-06 Thread Paul Osmialowski via cfe-commits
@@ -82,3 +82,29 @@ // CHECK-TWO-CONFIGS: -isysroot // CHECK-TWO-CONFIGS-SAME: /opt/data // CHECK-TWO-CONFIGS-SAME: -Wall + +//--- The linker input flags should be moved to the end of input list and appear only when linking. +// RUN: %clang --target=aarch64-unknown-linux-gnu --

[clang] Reapply "[clang] Fix name lookup for dependent bases" (PR #118003)

2024-12-06 Thread Mike Hommey via cfe-commits
glandium wrote: I was creducing it (well, cvise-ing). Here's a reproducer: ``` template struct MozPromise { class Private; private: void *mMagic4; }; template struct MozPromise::Private : MozPromise { void SetTaskPriority() { mMagic4 } } ``` https://github.com/llvm/llvm-project/pull

[clang] [llvm] [AArch64] Implement intrinsics for SME FP8 F1CVT/F2CVT and BF1CVT/BF2CVT (PR #118027)

2024-12-06 Thread via cfe-commits
https://github.com/CarolineConcatto approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/118027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[clang] Fix name lookup for dependent bases" (PR #118003)

2024-12-06 Thread Vladislav Belov via cfe-commits
vbe-sc wrote: > I was creducing it (well, cvise-ing). Here's a reproducer: > > ``` > template struct MozPromise { > class Private; > > private: > void *mMagic4; > }; > template > struct MozPromise::Private > : MozPromise { > void SetTaskPriority() { mMagic4 } > } > ``` Thanks, I'll

[clang] [Clang] [NFC] Migrate visitors in ARCMigrate (PR #116792)

2024-12-06 Thread via cfe-commits
Sirraide wrote: > we intend to open a PR to remove it @rjmccall Actually, any idea when that might happen? If not, I can take a look at that too (the only thing is I might miss a few things that we could remove because I’m not really familiar w/ ARCMT). https://github.com/llvm/llvm-project/p

[clang] [llvm] [AArch64] Implement intrinsics for SME FP8 FMOPA (PR #118115)

2024-12-06 Thread via cfe-commits
@@ -305,6 +305,21 @@ multiclass sme_outer_product_fp32 sz, ZPRRegOp zpr_ty, string mne def : SME_ZA_Tile_TwoPred_TwoVec_Pat; } +multiclass sme2_fp8_fmopa_za32 { +def NAME : sme_fp_outer_product_inst<0, 0b01, 0b00, TileOp32, ZPR8, mnemonic>, SMEPseudo2Instr { + bit

[clang] [llvm] [AArch64] Implement intrinsics for SME FP8 FMOPA (PR #118115)

2024-12-06 Thread via cfe-commits
https://github.com/CarolineConcatto approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/118115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-06 Thread via cfe-commits
pidgeon777 wrote: Hello everyone, I'm seeking clarification regarding the implementation of Outgoing Calls support. The LSP protocol currently allows to implement two display modes for visualizing outgoing function calls: ```c #include void function1(void) { printf("Executing function 1

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-06 Thread Paul Osmialowski via cfe-commits
@@ -490,6 +490,35 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, else A.renderAsInput(Args, CmdArgs); } + if (const Arg *A = Args.getLastArg(options::OPT_fveclib)) { +const llvm::Triple &Triple = TC.getTriple(); +StringRef

[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)

2024-12-06 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak updated https://github.com/llvm/llvm-project/pull/118249 >From 6281b990096f058cfb6ed862631b8d6436db23f7 Mon Sep 17 00:00:00 2001 From: MalavikaSamak Date: Fri, 29 Nov 2024 14:53:37 +0530 Subject: [PATCH] [-Wunsafe-buffer-usage] Suppress warning for multi-dimens

[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)

2024-12-06 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak updated https://github.com/llvm/llvm-project/pull/118249 >From 3a73ee44036b4162115061751241f105147f5947 Mon Sep 17 00:00:00 2001 From: MalavikaSamak Date: Fri, 29 Nov 2024 14:53:37 +0530 Subject: [PATCH] [-Wunsafe-buffer-usage] Suppress warning for multi-dimens

[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)

2024-12-06 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak edited https://github.com/llvm/llvm-project/pull/118249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)

2024-12-06 Thread Malavika Samak via cfe-commits
@@ -52,3 +52,37 @@ void constant_id_string(unsigned idx) { unsafe_char = ""[1]; //expected-warning{{unsafe buffer access}} unsafe_char = ""[idx]; //expected-warning{{unsafe buffer access}} } + +typedef float Float4x4[4][4]; + +// expected-warning@+1 {{'matrix' is an unsafe

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2024-12-06 Thread Michael Buch via cfe-commits
Michael137 wrote: > So, is this patch worth pursuing or is it too much code for a too specific > use case? Sorry I was out for a few weeks when you pinged. I'll have another pass/think about it early next week (if nobody else gets to it before me). https://github.com/llvm/llvm-project/pull/11

[clang] [clang][bytecode] Check primitive bit casts for indeterminate bits (PR #118954)

2024-12-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/118954 >From 265be81d34dfc3f24595ccd60f72a1207b700e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 6 Dec 2024 12:04:47 +0100 Subject: [PATCH] [clang][bytecode] Check primitive bit casts for

[clang] [clang][AArch64] Fix C++11 style initialization of typedef'd vectors (PR #118956)

2024-12-06 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue created https://github.com/llvm/llvm-project/pull/118956 Previously, this hit an `llvm_unreachable()` assertion as the type of `vec_t` did not exactly match the return type of `svdup_s8`, as it was wrapped in a typedef. Comparing the canonical types instead allows th

[clang] [clang][AArch64] Fix C++11 style initialization of typedef'd vectors (PR #118956)

2024-12-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Benjamin Maxwell (MacDue) Changes Previously, this hit an `llvm_unreachable()` assertion as the type of `vec_t` did not exactly match the return type of `svdup_s8`, as it was wrapped in a typedef. Comparing the canonical types instead al

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-06 Thread Nikita Popov via cfe-commits
https://github.com/nikic requested changes to this pull request. Fails to build with GCC: ``` FAILED: tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Builtins.cpp.o CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CON

[clang] [HLSL] Fix call convention mismatch for ctor/dtor (PR #118651)

2024-12-06 Thread Nathan Gauër via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -O3 -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-DXIL +// RUN: %clang_cc1 -triple spirv-vulkan-compute -x hlsl -emit-llvm -O3 -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK

[clang] [clang][NFC] Change suppression mapping interfaces to use SourceLocation (PR #118960)

2024-12-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: kadir çetinkaya (kadircet) Changes This way we can delay getting a presumed location even further, only performing it for diagnostics that are mapped. --- Full diff: https://github.com/llvm/llvm-project/pull/118960.diff 4 Files Affected

[clang] [clang][NFC] Change suppression mapping interfaces to use SourceLocation (PR #118960)

2024-12-06 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/118960 This way we can delay getting a presumed location even further, only performing it for diagnostics that are mapped. From 4c52dda9a253d643ef52f1f5f294cd1fd5bcfa76 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya

[clang] [clang][NFC] Change suppression mapping interfaces to use SourceLocation (PR #118960)

2024-12-06 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 3dbff90b16b5964b9fa468438ff40985be5c1ade 4c52dda9a253d643ef52f1f5f294cd1fd5bcfa76 --e

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

2024-12-06 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/115487 >From 5e24d212f797b5fa1b6da1526c807046373d3c21 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 8 Nov 2024 16:13:17 +0200 Subject: [PATCH 1/6] [Clang] skip default argument instantiation for non-definin

[clang] [llvm] [AArch64] Fix argument passing for SVE tuples (PR #118961)

2024-12-06 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov created https://github.com/llvm/llvm-project/pull/118961 The fix for passing Pure Scalable Types (https://github.com/llvm/llvm-project/pull/112747) was incomplete, it didn't handle correctly tuples of SVE vectors (e.g. `sveboolx2_t`, `svfloat32x4_t`, etc). T

[clang] [llvm] [AArch64] Fix argument passing for SVE tuples (PR #118961)

2024-12-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Momchil Velikov (momchil-velikov) Changes The fix for passing Pure Scalable Types (https://github.com/llvm/llvm-project/pull/112747) was incomplete, it didn't handle correctly tuples of SVE vectors (e.g. `sveboolx2_t`, `svfloat32x

[clang] [llvm] [AArch64] Fix argument passing for SVE tuples (PR #118961)

2024-12-06 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov edited https://github.com/llvm/llvm-project/pull/118961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 6bb5d6a - [NFC] Use a move instead of a copy to optimize performance. (#118699)

2024-12-06 Thread via cfe-commits
Author: Zahira Ammarguellat Date: 2024-12-06T07:54:27-05:00 New Revision: 6bb5d6ae23cace42bd108ca14e17e863c73bbb5c URL: https://github.com/llvm/llvm-project/commit/6bb5d6ae23cace42bd108ca14e17e863c73bbb5c DIFF: https://github.com/llvm/llvm-project/commit/6bb5d6ae23cace42bd108ca14e17e863c73bbb5c

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-06 Thread Kito Cheng via cfe-commits
@@ -519,9 +650,24 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(Arch == llvm::Triple::aarch64_be ? "-EB" : "-EL"); } - if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles, - options::OPT_r

[clang-tools-extra] [NFC] Use a move instead of a copy to optimize performance. (PR #118699)

2024-12-06 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam closed https://github.com/llvm/llvm-project/pull/118699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][OpenMP] Fix OpenMP target-toolchain-option parser (PR #115375)

2024-12-06 Thread Jefferson Le Quellec via cfe-commits
jle-quel wrote: @MaskRay @alexey-bataev, if everything looks good now, could we go ahead and merge this PR? Thanks for your time reviewing! https://github.com/llvm/llvm-project/pull/115375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang-tools-extra] [clangd] Document the cases in which Dex::Files and IdxContents are populated (PR #118906)

2024-12-06 Thread kadir çetinkaya via cfe-commits
@@ -121,6 +121,8 @@ class Dex : public SymbolIndex { llvm::DenseMap, std::vector> Relations; std::shared_ptr KeepAlive; // poor man's move-only std::any // Set of files which were used during this index build. + // Files and IdxContents are only populated for dynamic an

[clang-tools-extra] [NFC] Use a move instead of a copy to optimize performance. (PR #118699)

2024-12-06 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. this is just a shared-ptr, but still better without the copy, thanks! https://github.com/llvm/llvm-project/pull/118699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -4778,6 +4784,16 @@ class Sema final : public SemaBase { CXXRecordDecl *getStdBadAlloc() const; EnumDecl *getStdAlignValT() const; + const ClassTemplateDecl *getStdTypeIdentity() const; + ClassTemplateDecl *getStdTypeIdentity(); + std::optional instantiateSpecialized

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -2709,14 +2831,63 @@ static bool resolveAllocationOverload( llvm_unreachable("Unreachable, bad result from BestViableFunction"); } -bool Sema::FindAllocationFunctions(SourceLocation StartLoc, SourceRange Range, - AllocationFunctionScope N

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -3130,6 +3130,30 @@ bool Type::isStdByteType() const { return false; } +const TemplateDecl *Type::getSpecializedTemplateDecl() const { + const Type *DesugaredType = getUnqualifiedDesugaredType(); + if (const auto *Specialization = + DesugaredType->getAs()) +

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -3543,7 +3543,14 @@ def : Separate<["-"], "fnew-alignment">, Alias; def : Flag<["-"], "faligned-new">, Alias; def : Flag<["-"], "fno-aligned-new">, Alias; def faligned_new_EQ : Joined<["-"], "faligned-new=">; - +defm cxx_type_aware_allocators : BoolFOption<"experimental-cx

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -3482,15 +3486,40 @@ bool FunctionDecl::isDestroyingOperatorDelete() const { // Within a class C, a single object deallocation function with signature // (T, std::destroying_delete_t, ) // is a destroying operator delete. - if (!isa(this) || getOverloadedOpera

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -3482,15 +3486,40 @@ bool FunctionDecl::isDestroyingOperatorDelete() const { // Within a class C, a single object deallocation function with signature // (T, std::destroying_delete_t, ) // is a destroying operator delete. - if (!isa(this) || getOverloadedOpera

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -2146,6 +2146,12 @@ class Sema final : public SemaBase { isConstantEvaluatedOverride; } + TypeAwareAllocationMode allocationModeInCurrentContext() const { +if (getLangOpts().TypeAwareAllocators && !isConstantEvaluatedContext()) + return TypeAwareAlloc

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -2696,6 +2699,8 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { return static_cast(TypeBits.Dependence); } + const TemplateDecl *getSpecializedTemplateDecl() const; cor3ntin wrote: Does that need to be in the header? (the imp

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -9712,19 +9712,34 @@ def warn_operator_new_returns_null : Warning< "%select{| or 'noexcept'}1">, InGroup; def err_operator_new_dependent_param_type : Error< - "%0 cannot take a dependent type as first parameter; " - "use size_t (%1) instead">; + "%select{|type aware}1

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -3543,7 +3543,14 @@ def : Separate<["-"], "fnew-alignment">, Alias; def : Flag<["-"], "faligned-new">, Alias; def : Flag<["-"], "fno-aligned-new">, Alias; def faligned_new_EQ : Joined<["-"], "faligned-new=">; - +defm cxx_type_aware_allocators : BoolFOption<"experimental-cx

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/113510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
https://github.com/cor3ntin commented: A quick first pass https://github.com/llvm/llvm-project/pull/113510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -2709,14 +2831,63 @@ static bool resolveAllocationOverload( llvm_unreachable("Unreachable, bad result from BestViableFunction"); } -bool Sema::FindAllocationFunctions(SourceLocation StartLoc, SourceRange Range, - AllocationFunctionScope N

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -3357,6 +3357,10 @@ bool FunctionDecl::isReservedGlobalPlacementOperator() const { return false; const auto *proto = getType()->castAs(); + if (proto->getNumParams() < 2) +return false; + if (proto->getParamType(0)->isTypeIdentitySpecialization()) +return f

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -1847,15 +1913,42 @@ static bool hasNewExtendedAlignment(Sema &S, QualType AllocType) { S.getASTContext().getTargetInfo().getNewAlign(); } +static bool CheckDeleteOperator(Sema &S, SourceLocation StartLoc, +SourceRange Range, bo

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -16106,6 +16127,128 @@ bool Sema::CompleteConstructorCall(CXXConstructorDecl *Constructor, return Invalid; } +bool Sema::isTypeIdentitySpecialization(QualType Type) const { + const ClassTemplateDecl *TypeIdentity = getStdTypeIdentity(); + if (!TypeIdentity) +return

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -16106,6 +16127,128 @@ bool Sema::CompleteConstructorCall(CXXConstructorDecl *Constructor, return Invalid; } +bool Sema::isTypeIdentitySpecialization(QualType Type) const { + const ClassTemplateDecl *TypeIdentity = getStdTypeIdentity(); + if (!TypeIdentity) +return

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -1520,7 +1533,7 @@ static void EnterNewDeleteCleanup(CodeGenFunction &CGF, llvm::Value *AllocSize, CharUnits AllocAlign, const CallArgList &NewArgs) { - unsigned NumNonPlac

[clang] [llvm] [AArch64] Add initial support for FUJITSU-MONAKA (PR #118432)

2024-12-06 Thread David Green via cfe-commits
davemgreen wrote: We never know who does and doesn't have commit access. Let us know if you are happy and want us to hit submit. Thanks. https://github.com/llvm/llvm-project/pull/118432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [AST] Include clang/Basic/DiagnosticComment.h instead of clang/AST/CommentDiagnostic.h (PR #117499)

2024-12-06 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata edited https://github.com/llvm/llvm-project/pull/117499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Include clang/Basic/DiagnosticComment.h instead of clang/AST/CommentDiagnostic.h (PR #117499)

2024-12-06 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata edited https://github.com/llvm/llvm-project/pull/117499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Include clang/Basic/DiagnosticComment.h instead of clang/AST/CommentDiagnostic.h (PR #117499)

2024-12-06 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/117499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] efe4bfa - [AST] Include clang/Basic/DiagnosticComment.h instead of clang/AST/CommentDiagnostic.h (#117499)

2024-12-06 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-12-06T00:32:43-08:00 New Revision: efe4bfa623d40f8221f449c3dd38392101a53599 URL: https://github.com/llvm/llvm-project/commit/efe4bfa623d40f8221f449c3dd38392101a53599 DIFF: https://github.com/llvm/llvm-project/commit/efe4bfa623d40f8221f449c3dd38392101a53599.diff L

[clang] [AST] Include clang/Basic/DiagnosticComment.h instead of clang/AST/CommentDiagnostic.h (PR #117499)

2024-12-06 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: I'm going to go conservative for now by including `clang/Basic/DiagnosticComment.h` instead of `clang/AST/CommentDiagnostic.h`. We can revisit this and remove `clang/AST/CommentDiagnostic.h` and update `module.modulemap`. https://github.com/llvm/llvm-project/pull/117499

[clang] [clang][bytecode] Check primitive bit casts for indeterminate bits (PR #118954)

2024-12-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118954 Record bits ranges of initialized bits and check them in allInitialized(). >From 89cc19bfa6590d49864797ebeda300396110161b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 6 Dec 2024 12:0

[clang] [clang][bytecode] Check primitive bit casts for indeterminate bits (PR #118954)

2024-12-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Record bits ranges of initialized bits and check them in allInitialized(). --- Full diff: https://github.com/llvm/llvm-project/pull/118954.diff 6 Files Affected: - (modified) clang/lib/AST/ByteCode/Bitcast

[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)

2024-12-06 Thread Malavika Samak via cfe-commits
@@ -8,6 +8,5 @@ // main function int main(int argc, char *argv[]) { // expected-warning{{'argv' is an unsafe pointer used for buffer access}} char tmp; - tmp = argv[5][5];// expected-note{{used in buffer access here}} \ -

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-12-06 Thread Younan Zhang via cfe-commits
@@ -247,18 +242,23 @@ getGenericLambdaTemplateParameterList(LambdaScopeInfo *LSI, Sema &SemaRef) { CXXRecordDecl * Sema::createLambdaClosureType(SourceRange IntroducerRange, TypeSourceInfo *Info, - unsigned LambdaDependencyKind, -

[clang] Reapply "[clang] Fix name lookup for dependent bases" (PR #118003)

2024-12-06 Thread Vladislav Belov via cfe-commits
vbe-sc wrote: > I'm hitting an assertion on some Firefox code after this landed: > > ``` > clang++: /tmp/llvm/llvm/include/llvm/Support/Casting.h:566: decltype(auto) > llvm::cast(const From &) [To = cl > ang::RecordType, From = clang::QualType]: Assertion `isa(Val) && > "cast() argument of inc

[clang] [Clang][Xtensa] Add Xtensa target. (PR #118008)

2024-12-06 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: I'm not active in this area, so removed myself from the list of reviewers. https://github.com/llvm/llvm-project/pull/118008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

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

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-12-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 commented: I took another pass through the code, and it looks good overall. Given the scale of this patch, input from others would be valuable. It would be nice if you could move the patch out of draft status to get more visibility :) https://github.com/llvm/llvm-pro

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-12-06 Thread Younan Zhang via cfe-commits
@@ -17658,8 +17662,49 @@ HandleImmediateInvocations(Sema &SemaRef, } } +static void setContextDecl(Sema &S, Decl *Base, Decl *ContextDecl) { + switch (Base->getKind()) { + case Decl::CXXRecord: { +auto *RD = cast(Base); +RD->setLambdaContextDecl(ContextDecl); +

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-12-06 Thread Younan Zhang via cfe-commits
@@ -7946,6 +7980,8 @@ class Sema final : public SemaBase { /// A stack of expression evaluation contexts. SmallVector ExprEvalContexts; + SmallVector PendingLazyContextDecls; zyn0217 wrote: So from a quick reading, PendingLazyContextDecls is used for lam

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-12-06 Thread Younan Zhang via cfe-commits
@@ -8494,10 +8495,21 @@ DeclResult Sema::ActOnClassTemplateSpecialization( return Specialization; } -Decl *Sema::ActOnTemplateDeclarator(Scope *S, - MultiTemplateParamsArg TemplateParameterLists, -Declarator &D

[clang] [ExprConst] Handle floating- and char literals in FastEvaluateAsRValue (PR #118294)

2024-12-06 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/118294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f893b47 - [ARM] Fix instruction selection for MVE vsbciq intrinsic (#118284)

2024-12-06 Thread via cfe-commits
Author: Oliver Stannard Date: 2024-12-06T08:46:56Z New Revision: f893b475004fdea48288f329124817325e659792 URL: https://github.com/llvm/llvm-project/commit/f893b475004fdea48288f329124817325e659792 DIFF: https://github.com/llvm/llvm-project/commit/f893b475004fdea48288f329124817325e659792.diff LO

[clang] [llvm] [ARM] Fix instruction selection for MVE vsbciq intrinsic (PR #118284)

2024-12-06 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard closed https://github.com/llvm/llvm-project/pull/118284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2d8e8dd - [ARM] Add Cortex-A510 CPU for AArch32 (#118811)

2024-12-06 Thread via cfe-commits
Author: Oliver Stannard Date: 2024-12-06T08:51:22Z New Revision: 2d8e8dd2b83da113dd94f01c67fb8b3e3ce38cc9 URL: https://github.com/llvm/llvm-project/commit/2d8e8dd2b83da113dd94f01c67fb8b3e3ce38cc9 DIFF: https://github.com/llvm/llvm-project/commit/2d8e8dd2b83da113dd94f01c67fb8b3e3ce38cc9.diff LO

[clang] [llvm] [ARM] Add Cortex-A510 CPU for AArch32 (PR #118811)

2024-12-06 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard closed https://github.com/llvm/llvm-project/pull/118811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b569ec6 - [SCCP] Infer nuw for gep nusw with non-negative offsets (#118819)

2024-12-06 Thread via cfe-commits
Author: Nikita Popov Date: 2024-12-06T09:52:32+01:00 New Revision: b569ec6de6a0c57d6c4b675df7d7e3e28a9f4904 URL: https://github.com/llvm/llvm-project/commit/b569ec6de6a0c57d6c4b675df7d7e3e28a9f4904 DIFF: https://github.com/llvm/llvm-project/commit/b569ec6de6a0c57d6c4b675df7d7e3e28a9f4904.diff

[clang] [llvm] [SCCP] Infer nuw for gep nusw with non-negative offsets (PR #118819)

2024-12-06 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/118819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-12-06 Thread Younan Zhang via cfe-commits
@@ -17658,8 +17662,49 @@ HandleImmediateInvocations(Sema &SemaRef, } } +static void setContextDecl(Sema &S, Decl *Base, Decl *ContextDecl) { + switch (Base->getKind()) { + case Decl::CXXRecord: { +auto *RD = cast(Base); +RD->setLambdaContextDecl(ContextDecl); +

[clang] [CodeGen] Migrate away from PointerUnion::{is, get} (NFC) (PR #118600)

2024-12-06 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/118600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 91d6e10 - [CodeGen] Migrate away from PointerUnion::{is, get} (NFC) (#118600)

2024-12-06 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-12-06T01:45:56-08:00 New Revision: 91d6e10cca4ea8d50927aba024f33c9076785d3a URL: https://github.com/llvm/llvm-project/commit/91d6e10cca4ea8d50927aba024f33c9076785d3a DIFF: https://github.com/llvm/llvm-project/commit/91d6e10cca4ea8d50927aba024f33c9076785d3a.diff L

[clang] [CodeGen] Migrate away from PointerUnion::{is, get} (NFC) (PR #118600)

2024-12-06 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/118600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SystemZ] Add support for __builtin_setjmp and __builtin_longjmp (PR #116642)

2024-12-06 Thread Ulrich Weigand via cfe-commits
@@ -374,10 +374,11 @@ overall functioning of this intrinsic is compatible with the GCC to interoperate. The single parameter is a pointer to a five word buffer in which the calling -context is saved. The front end places the frame pointer in the first word, and -the target im

[clang] [llvm] [SystemZ] Add support for __builtin_setjmp and __builtin_longjmp (PR #116642)

2024-12-06 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/116642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add intrinsics for SME FP8 FDOT LANE instructions (PR #118492)

2024-12-06 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray updated https://github.com/llvm/llvm-project/pull/118492 >From 609cf3fbdb28c155f4b8c787c1e2cb791c8a292f Mon Sep 17 00:00:00 2001 From: Jonathan Thackray Date: Fri, 29 Nov 2024 11:27:03 + Subject: [PATCH 1/6] [AArch64] Add intrinsics for SME FP8 FDOT LANE instru

[clang] [llvm] [AArch64] Add intrinsics for SME FP8 FDOT LANE instructions (PR #118492)

2024-12-06 Thread Jonathan Thackray via cfe-commits
@@ -986,8 +986,8 @@ def LUTI4_S_4ZZT2Z : sme2_luti4_vector_vg4_strided<0b00, 0b00, "luti4">; let Predicates = [HasSMEF8F16] in { defm FVDOT_VG2_M2ZZI_BtoH : sme2p1_multi_vec_array_vg2_index_f8f16<"fvdot", 0b11, 0b110, ZZ_b_mul_r, ZPR4b8>; -defm FDOT_VG2_M2ZZI_BtoH : sme2p1

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-06 Thread Timm Baeder via cfe-commits
@@ -68,23 +69,156 @@ enum ID { FirstTSBuiltin }; +// The info used to represent each builtin. struct Info { - llvm::StringLiteral Name; - const char *Type, *Attributes; - const char *Features; + // Rather than store pointers to the string literals describing these four

[clang] [AST] Include clang/Basic/DiagnosticComment.h instead of clang/AST/CommentDiagnostic.h (PR #117499)

2024-12-06 Thread Richard Trieu via cfe-commits
Weverything wrote: I support getting rid of the Diagnostic.h files outside of the Basic directory, at least when they are just forwarding headers. From a layering point of view, Clang_Diagnostics should be the same level as Basic so it shouldn't be having things from AST. Removing the forwar

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-12-06 Thread via cfe-commits
@@ -4778,6 +4784,16 @@ class Sema final : public SemaBase { CXXRecordDecl *getStdBadAlloc() const; EnumDecl *getStdAlignValT() const; + const ClassTemplateDecl *getStdTypeIdentity() const; + ClassTemplateDecl *getStdTypeIdentity(); + std::optional instantiateSpecialized

[clang-tools-extra] [clangd] Add quick fix to automatically adds NOLINTNEXTLINE comment (PR #114661)

2024-12-06 Thread kadir çetinkaya via cfe-commits
kadircet wrote: (sorry for the late reply) > Just want to confirm that this infrastructure isn't currently being used by > anything in Clangd. we do have some out-of-tree usages, but nothing in the tree, apart from tests, use this infrastructure yet. > I assume I should extend FeatureModule

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-06 Thread Kito Cheng via cfe-commits
@@ -503,12 +624,22 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, const llvm::Triple::ArchType Arch = TC.getArch(); const llvm::Triple &Triple = getToolChain().getEffectiveTriple(); - AddLinkerInputs(TC, Inputs, Args, CmdArgs, JA); + if (!D

[clang] [C++20] Destroying delete and deleted destructors (PR #118800)

2024-12-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/118800 >From 34d3d3000bc6096bbc9eb35ce85b6ceca50b91ca Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 5 Dec 2024 08:31:24 -0500 Subject: [PATCH 1/4] [C++20] Destroying delete and deleted destructors When

[clang] [clang][AArch64] Fix C++11 style initialization of typedef'd vectors (PR #118956)

2024-12-06 Thread Paul Walker via cfe-commits
@@ -0,0 +1,23 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 +// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-linux-gnu -target-feature +sve -emit-llvm -o - %s | FileCheck %s + +#include + +using vec_t =

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-06 Thread Garvit Gupta via cfe-commits
@@ -503,12 +624,22 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, const llvm::Triple::ArchType Arch = TC.getArch(); const llvm::Triple &Triple = getToolChain().getEffectiveTriple(); - AddLinkerInputs(TC, Inputs, Args, CmdArgs, JA); + if (!D

[clang] [llvm] [AArch64] Refactor implementation of FP8 types (NFC) (PR #118969)

2024-12-06 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov created https://github.com/llvm/llvm-project/pull/118969 * The FP8 scalar type (`__mfp8`) was described as a vector type * The FP8 vector types were described/assumed to have integer element type (the element type ought to be `__mfp8`), * Add

[clang] [llvm] [AArch64] Refactor implementation of FP8 types (NFC) (PR #118969)

2024-12-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Momchil Velikov (momchil-velikov) Changes * The FP8 scalar type (`__mfp8`) was described as a vector type * The FP8 vector types were described/assumed to have integer element type (the element type ought to be `__mf

[clang] [clang-tools-extra] [clang] Compute accurate begin location for CallExpr with explicit object parameter (PR #117841)

2024-12-06 Thread Nikita Popov via cfe-commits
nikic wrote: It looks like this causes a significant compile-time regression: https://llvm-compile-time-tracker.com/compare.php?from=2b855dd97092e2178ac5c470a804a17ec440d7e5&to=9ccde12f5eeb91152900082a2ae839e2a9702b31&stat=instructions:u (Maybe most clearly seen during clang bootstrap, where th

  1   2   3   4   5   >