[clang] [libcxx] [lld] [llvm] Triple::normalize: Set OS for 3-component triple with none as middle (PR #89638)

2024-04-23 Thread YunQiang Su via cfe-commits
wzssyqa wrote: @llvm/pr-subscribers-backend-arm @llvm/pr-subscribers-backend-aarch64 https://github.com/llvm/llvm-project/pull/89638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9ba6961 - Reapply "[clang][dataflow] Model conditional operator correctly." with fixes (#89596)

2024-04-23 Thread via cfe-commits
Author: martinboehme Date: 2024-04-23T08:10:55+02:00 New Revision: 9ba6961ce05b17a70c22354f0b54a963ed1ab49c URL: https://github.com/llvm/llvm-project/commit/9ba6961ce05b17a70c22354f0b54a963ed1ab49c DIFF: https://github.com/llvm/llvm-project/commit/9ba6961ce05b17a70c22354f0b54a963ed1ab49c.diff

[clang] Reapply "[clang][dataflow] Model conditional operator correctly." with fixes (PR #89596)

2024-04-23 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/89596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-23 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,274 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-23 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Fix sanitizer issue. https://github.com/llvm/llvm-project/pull/85572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] [compiler-rt] [flang] [libc] [libclc] [libcxx] [libcxxabi] [libunwind] [lld] [lldb] [llvm] [mlir] [openmp] [polly] [pstl] Update IDE Folders (PR #89153)

2024-04-23 Thread James Henderson via cfe-commits
jh7370 wrote: > This looks like a nice improvement for folks using those generators. Even > though most of these changes look straightforward, it would be a lot easier > to review if this was broken up per subproject. Is there any reason that's > not possible? +1 to this: 195 files is too

[clang] [libcxx] [llvm] Triple::normalize: Set OS for 3-component triple with none as middle (PR #89638)

2024-04-23 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa converted_to_draft https://github.com/llvm/llvm-project/pull/89638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [llvm] Triple::normalize: Set OS for 3-component triple with none as middle (PR #89638)

2024-04-23 Thread YunQiang Su via cfe-commits
wzssyqa wrote: @peterwaller-arm Ohh, there is so many `-none-unknown-` in current code. I guess it may be widely used. Do we really want to change all of them? https://github.com/llvm/llvm-project/pull/89638 ___ cfe-commits mailing list

[clang] a046242 - [clang] Set correct FPOptions if attribute 'optnone' presents (#85605)

2024-04-23 Thread via cfe-commits
Author: Serge Pavlov Date: 2024-04-23T14:14:02+07:00 New Revision: a04624206ddf03dc54d5c372e7eac13575b4124b URL: https://github.com/llvm/llvm-project/commit/a04624206ddf03dc54d5c372e7eac13575b4124b DIFF: https://github.com/llvm/llvm-project/commit/a04624206ddf03dc54d5c372e7eac13575b4124b.diff

[clang] [clang] Set correct FPOptions if attribute 'optnone' presents (PR #85605)

2024-04-23 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff closed https://github.com/llvm/llvm-project/pull/85605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [lld] [llvm] Triple::normalize: Set OS for 3-component triple with none as middle (PR #89638)

2024-04-23 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa updated https://github.com/llvm/llvm-project/pull/89638 >From 11ae27aeb512b661a3423a8b92642a9ec08ca6a1 Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Tue, 23 Apr 2024 01:36:17 +0800 Subject: [PATCH] Triple::normalize: Set OS for 3-component triple with none as

[clang] [Driver] Restore compiler-rt arch suffix for PS and Windows (PR #89775)

2024-04-23 Thread Fangrui Song via cfe-commits
MaskRay wrote: My recollection of the past discussions is that we want users to switch to the new hierarchy. *BSD, Linux, and z/OS have migrated but I am not familiar with the Windows ecosystems. `ToolChain::getCompilerRT` detects both the old and new compiler-rt directory. Does it not work

[clang] [llvm] [CodeGen][i386] Move -mregparm storage earlier and fix Runtime calls (PR #89707)

2024-04-23 Thread Eli Friedman via cfe-commits
@@ -4781,6 +4782,7 @@ CodeGenModule::CreateRuntimeFunction(llvm::FunctionType *FTy, StringRef Name, } } setDSOLocal(F); + markRegisterParameterAttributes(F); efriedma-quic wrote: This really shouldn't work this way: we should go

[clang] [llvm] [ARM] Armv8-R does not require fp64 or neon. (PR #88287)

2024-04-23 Thread Chris Copeland via cfe-commits
chrisnc wrote: Updated to fix the conflict with the ARM.td refactor. Ready for review. https://github.com/llvm/llvm-project/pull/88287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Dan Liew via cfe-commits
delcypher wrote: @AaronBallman Thanks for the feedback > We should probably add a release note to tell users about the new command > line option, unless you think it makes more sense to do so after something > uses `LateAttrParseExperimentalExt`? I had a think about it and I'll add a release

[clang] Reapply "[Clang][Sema] placement new initializes typedef array with correct size (#83124)" (PR #89036)

2024-04-23 Thread via cfe-commits
mahtohappy wrote: Hi @ilovepi Sure. Looking at this. https://github.com/llvm/llvm-project/pull/89036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Correctly determine the toolchain linker (PR #89803)

2024-04-23 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/89803 Summary: The AMDGPU toolchain simply took the short name to get the link job instead of using the common utilities that respect options like `-fuse-ld`. Any linker that isn't `ld.lld` will fail, however we should

[clang] [Attributes] Support Attributes being declared as supporting an experimental late parsing mode "extension" (PR #88596)

2024-04-23 Thread Dan Liew via cfe-commits
@@ -592,6 +592,48 @@ class AttrSubjectMatcherAggregateRule { def SubjectMatcherForNamed : AttrSubjectMatcherAggregateRule; +// Late Attribute parsing mode enum +class LateAttrParseKind { + int Kind = val; +} + +// Never late parsed +def LateAttrParseNever :

[clang] [Clang] [NFC] Prevent null pointer dereference in Sema::InstantiateFunctionDefinition (PR #89801)

2024-04-23 Thread via cfe-commits
https://github.com/Sirraide commented: A pr that just adds assertions and nothing else seems like a very weird thing to do. Moreover, a few lines above in the same function, we return if this isn’t a copy/move ctor/assignment operator, which always has at least one parameter; I don’t think it

[clang] [Clang] [NFC] Prevent null pointer dereference in Sema::InstantiateFunctionDefinition (PR #89801)

2024-04-23 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/89801 >From 326b428c826e866feb538b9dcd33a9df957f9f69 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Tue, 23 Apr 2024 10:37:01 -0700 Subject: [PATCH 1/2] [Clang] [NFC] Prevent null pointer dereference in

[clang] [WebAssembly] Fix uses of -DAG and -NOT in wasm-target-features.c (PR #89777)

2024-04-23 Thread Thomas Lively via cfe-commits
https://github.com/tlively approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/89777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-23 Thread James Y Knight via cfe-commits
https://github.com/jyknight commented: I think having the on-by-default diagnostic before we release this functionality is critically important -- but the primarily-useful part of that is going to be for the public libc++ APIs which expose these values (and, that already landed in mainline).

[clang] [WebAssembly] Enable multivalue and reference-types in generic CPU config (PR #80923)

2024-04-23 Thread Thomas Lively via cfe-commits
https://github.com/tlively edited https://github.com/llvm/llvm-project/pull/80923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Enable multivalue and reference-types in generic CPU config (PR #80923)

2024-04-23 Thread Thomas Lively via cfe-commits
https://github.com/tlively approved this pull request. https://github.com/llvm/llvm-project/pull/80923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Enable multivalue and reference-types in generic CPU config (PR #80923)

2024-04-23 Thread Thomas Lively via cfe-commits
@@ -147,19 +147,25 @@ void WebAssemblyTargetInfo::setFeatureEnabled(llvm::StringMap , bool WebAssemblyTargetInfo::initFeatureMap( llvm::StringMap , DiagnosticsEngine , StringRef CPU, const std::vector ) const { - if (CPU == "bleeding-edge") { -

[clang] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-23 Thread James Y Knight via cfe-commits
https://github.com/jyknight edited https://github.com/llvm/llvm-project/pull/89446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-23 Thread James Y Knight via cfe-commits
@@ -1792,6 +1792,11 @@ class TargetInfo : public TransferrableTargetInfo, /// Whether to support HIP image/texture API's. virtual bool hasHIPImageSupport() const { return true; } + /// The minimum offset between two objects to avoid false sharing.

[clang] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-23 Thread James Y Knight via cfe-commits
@@ -1792,6 +1792,11 @@ class TargetInfo : public TransferrableTargetInfo, /// Whether to support HIP image/texture API's. virtual bool hasHIPImageSupport() const { return true; } + /// The minimum offset between two objects to avoid false sharing. + virtual unsigned

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-23 Thread Zahira Ammarguellat via cfe-commits
@@ -2922,7 +2922,7 @@ static bool handleFloatFloatBinOp(EvalInfo , const BinaryOperator *E, // If during the evaluation of an expression, the result is not // mathematically defined [...], the behavior is undefined. // FIXME: C++ rules require us to not conform to

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-23 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: We probably need to attach this to ClangABI as well, this is an ABI breaking change. https://github.com/llvm/llvm-project/pull/89807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-23 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/89807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-23 Thread Erich Keane via cfe-commits
@@ -6561,7 +6561,7 @@ void Clang::ConstructJob(Compilation , const JobAction , if (const Arg *A = Args.getLastArg(options::OPT_fvisibility_global_new_delete_hidden)) { D.Diag(diag::warn_drv_deprecated_arg) -<< A->getAsString(Args) +<<

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-23 Thread Erich Keane via cfe-commits
@@ -8343,58 +8343,52 @@ bool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, // C++1z [temp.arg.template]p3: (DR 150) // A template-argument matches a template template-parameter P when P // is at least as specialized as the template-argument A.

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-23 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 78eb2c2cba5ad0f9a36ec1959371527313a76bbe 22b67d30ca087d6a912183039c87fd1790eedfe4 --

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-23 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Also needs a release note, entry into breaking changes, and a post on mailing list or whatever for the 'breaking change' subscribers to pay attention to. https://github.com/llvm/llvm-project/pull/89807 ___

[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-23 Thread Troy Butler via cfe-commits
https://github.com/Troy-Butler updated https://github.com/llvm/llvm-project/pull/89512 >From f03466fa44a3c7210e7590e6305bc0c9f9aeb446 Mon Sep 17 00:00:00 2001 From: Troy-Butler Date: Sat, 20 Apr 2024 15:13:09 -0400 Subject: [PATCH 1/5] Fix Definition-Declaration Mismatches Signed-off-by:

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-23 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall edited https://github.com/llvm/llvm-project/pull/89441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-23 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. Thanks! This looks good, much neater than my approach. I'm interested in whether the DirectUses change is related to this, and would like to slap on a couple of tests. But either way, this looks good and it would be great to have it

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-23 Thread Sam McCall via cfe-commits
@@ -0,0 +1,20 @@ +// This test checks that a module map with a textual header can be marked as sam-mccall wrote: This is a useful test, I think there are a couple of other affecting-ness properties that are important to test: - that a textual header that *is*

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-23 Thread Sam McCall via cfe-commits
@@ -187,7 +187,8 @@ GetAffectingModuleMaps(const Preprocessor , Module *RootModule) { continue; const HeaderFileInfo *HFI = HS.getExistingLocalFileInfo(*File); -if (!HFI || (HFI->isModuleHeader && !HFI->isCompilingModuleHeader)) +if (!HFI ||

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-23 Thread Sam McCall via cfe-commits
@@ -237,6 +238,8 @@ GetAffectingModuleMaps(const Preprocessor , Module *RootModule) { CollectIncludingMapsFromAncestors(CurrentModule); for (const Module *ImportedModule : CurrentModule->Imports) CollectIncludingMapsFromAncestors(ImportedModule); +for (const

[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-23 Thread Troy Butler via cfe-commits
https://github.com/Troy-Butler updated https://github.com/llvm/llvm-project/pull/89512 >From f03466fa44a3c7210e7590e6305bc0c9f9aeb446 Mon Sep 17 00:00:00 2001 From: Troy-Butler Date: Sat, 20 Apr 2024 15:13:09 -0400 Subject: [PATCH 1/6] Fix Definition-Declaration Mismatches Signed-off-by:

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-23 Thread Joshua Cranmer via cfe-commits
@@ -2922,7 +2922,7 @@ static bool handleFloatFloatBinOp(EvalInfo , const BinaryOperator *E, // If during the evaluation of an expression, the result is not // mathematically defined [...], the behavior is undefined. // FIXME: C++ rules require us to not conform to

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-clang-driver Author: S. Bharadwaj Yadavalli (bharadwajy) Changes An earlier commit provided a way to decouple DXIL version from Shader Model version by representing the DXIL version as `SubArch` in the DXIL Target Triple and

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-23 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,20 @@ +// This test checks that a module map with a textual header can be marked as jansvoboda11 wrote: This patch unfortunately doesn't pass that test (on line 44) due to [this](https://github.com/llvm/llvm-project/pull/89441/files#r1576422103):

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-23 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/89441 >From 9165d6086e2570198fba1c333d0c9cb9c09037c7 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 19 Apr 2024 12:13:06 -0700 Subject: [PATCH 1/5] [clang][modules] Allow module map files with textual

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-04-23 Thread Joshua Cranmer via cfe-commits
https://github.com/jcranmer-intel updated https://github.com/llvm/llvm-project/pull/80475 >From 971cc613e994a308f939f68247257b65e04c74fa Mon Sep 17 00:00:00 2001 From: Joshua Cranmer Date: Fri, 2 Feb 2024 10:35:29 -0800 Subject: [PATCH 1/3] Disable FTZ/DAZ when compiling shared libraries by

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-23 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: If you have a select with both wrapping and non-wrapping operands, is the result wrapping? If you declare a variable as both wrapping and non-wrapping, is it wrapping? If you declare a function parameter both wrapping and non-wrapping, is it wrapping? If you assign to

[clang] [clang-repl] Test explicit emission of dtors in runtime interface builder (NFC) (PR #89734)

2024-04-23 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gr=C3=A4nitz?= Message-ID: In-Reply-To: https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/89734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Improve documented sampling profiler steps to best known methods (PR #88438)

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

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vassil Vassilev (vgvassilev) Changes The IdResolver chain is the main way for C to implement lookup rules. Every new partial translation unit caused clang to exit the top-most scope which in turn cleaned up the IdResolver chain. That was

[clang] [WebAssembly] Tidy up wasm-target-features.c (PR #89778)

2024-04-23 Thread Thomas Lively via cfe-commits
https://github.com/tlively approved this pull request. https://github.com/llvm/llvm-project/pull/89778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate list init braces of class types (PR #89706)

2024-04-23 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/89706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-04-23 Thread Nico Weber via cfe-commits
nico wrote: > I would suggest we revert this - and at least collect all the observed side > effects and declare them before considering relanding it. That sounds good to me. Do you have a list of PRs to revert? > ... then we do still get the old name embedded. Sure. The motivation on our

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-23 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/88182 >From 426e74cabb003eb5dc83adf347a5800d49bc87b7 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 18 Mar 2024 11:49:12 + Subject: [PATCH 1/8] Start migrating away from the embedded assumption that the

[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-23 Thread Troy Butler via cfe-commits
https://github.com/Troy-Butler updated https://github.com/llvm/llvm-project/pull/89512 >From f03466fa44a3c7210e7590e6305bc0c9f9aeb446 Mon Sep 17 00:00:00 2001 From: Troy-Butler Date: Sat, 20 Apr 2024 15:13:09 -0400 Subject: [PATCH 1/4] Fix Definition-Declaration Mismatches Signed-off-by:

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-23 Thread Matheus Izvekov via cfe-commits
@@ -8343,58 +8343,52 @@ bool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, // C++1z [temp.arg.template]p3: (DR 150) // A template-argument matches a template template-parameter P when P // is at least as specialized as the template-argument A.

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-04-23 Thread Lei Huang via cfe-commits
@@ -141,46 +149,98 @@ PPC_LNX_CPU("power10",47) #define AIX_BUILTIN_PPC_TRUE 1 #define AIX_BUILTIN_PPC_FALSE 0 #define USE_SYS_CONF 2 - - // Supported COMPARE_OP values. - #define COMP_EQ 0 - + #define SYS_CALL 3 #endif // The value of SUPPORT_METHOD can be

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-04-23 Thread Lei Huang via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -triple powerpc-ibm-aix7.2.0.0 -emit-llvm -o - %s | FileCheck %s + +int main() { + int ret = 0; + ret += __builtin_cpu_supports("vsx"); + ret += __builtin_cpu_supports("htm"); + ret += __builtin_cpu_supports("cellbe"); + ret +=

[clang] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-23 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,294 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple spirv64-amd-amdhsa -x hip \ +// RUN: -aux-triple x86_64-unknown-linux-gnu -fcuda-is-device -emit-llvm %s \ +// RUN: -o - | FileCheck %s + +// RUN:

[clang] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-23 Thread James Y Knight via cfe-commits
@@ -89,6 +89,19 @@ sections with improvements to Clang's support for those languages. C++ Language Changes +C++17 Feature Support +^ +- Clang now exposes ``__GCC_DESTRUCTIVE_SIZE`` and ``__GCC_CONSTRUCTIVE_SIZE`` + predefined macros

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-23 Thread Daniel M. Katz via cfe-commits
@@ -2554,16 +2554,27 @@ Decl *Parser::ParseDeclarationAfterDeclarator( return ParseDeclarationAfterDeclaratorAndAttributes(D, TemplateInfo); } +static bool isConstexprVariable(const Decl *D) { + if (const VarDecl *Var = dyn_cast_if_present(D)) +return

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-23 Thread Daniel M. Katz via cfe-commits
@@ -2554,16 +2554,27 @@ Decl *Parser::ParseDeclarationAfterDeclarator( return ParseDeclarationAfterDeclaratorAndAttributes(D, TemplateInfo); } +static bool isConstexprVariable(const Decl *D) { + if (const VarDecl *Var = dyn_cast_if_present(D)) +return

[clang] [clang-tools-extra] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-23 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/84384 >From ef23d427b48687b62da9e1062886ddfcc1649b6a Mon Sep 17 00:00:00 2001 From: John McCall Date: Mon, 16 Dec 2019 20:31:25 -0500 Subject: [PATCH 1/9] Abstract serialization fixes for the Apple Clang changes.

[clang] [WebAssembly] Enable multivalue and reference-types in generic CPU config (PR #80923)

2024-04-23 Thread Derek Schuff via cfe-commits
@@ -147,19 +147,25 @@ void WebAssemblyTargetInfo::setFeatureEnabled(llvm::StringMap , bool WebAssemblyTargetInfo::initFeatureMap( llvm::StringMap , DiagnosticsEngine , StringRef CPU, const std::vector ) const { - if (CPU == "bleeding-edge") { -

[clang] [WebAssembly] Enable multivalue and reference-types in generic CPU config (PR #80923)

2024-04-23 Thread Derek Schuff via cfe-commits
https://github.com/dschuff edited https://github.com/llvm/llvm-project/pull/80923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Enable multivalue and reference-types in generic CPU config (PR #80923)

2024-04-23 Thread Derek Schuff via cfe-commits
https://github.com/dschuff approved this pull request. (also LGTM FTR) https://github.com/llvm/llvm-project/pull/80923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-23 Thread Erich Keane via cfe-commits
@@ -8343,58 +8343,52 @@ bool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, // C++1z [temp.arg.template]p3: (DR 150) // A template-argument matches a template template-parameter P when P // is at least as specialized as the template-argument A.

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-23 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/89441 >From 9165d6086e2570198fba1c333d0c9cb9c09037c7 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 19 Apr 2024 12:13:06 -0700 Subject: [PATCH 1/5] [clang][modules] Allow module map files with textual

[clang] [clang-tools-extra] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-04-23 Thread via cfe-commits
https://github.com/komalverma04 updated https://github.com/llvm/llvm-project/pull/89553 >From 4a56db71e8bf2b6414cd305515d9d4434be8efc0 Mon Sep 17 00:00:00 2001 From: komalverma04 Date: Mon, 22 Apr 2024 02:37:25 +0530 Subject: [PATCH 1/3] remove IgnoreParenImpCasts() from hasArgument matcher

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-04-23 Thread Joshua Cranmer via cfe-commits
jcranmer-intel wrote: Ping for review https://github.com/llvm/llvm-project/pull/80475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-23 Thread Chris B via cfe-commits
@@ -98,9 +100,47 @@ std::optional tryParseProfile(StringRef Profile) { else if (llvm::getAsUnsignedInteger(Parts[2], 0, Minor)) return std::nullopt; - // dxil-unknown-shadermodel-hull + // Determine DXIL version number using the minor version number of Shader + //

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-23 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The C standard is small enough that if you comb through the C grammar carefully, you can probably come up with explicitly rules for all the important constructs, and verify they work. There's probably still a long tail of weird interactions with current and future clang

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-04-23 Thread Pranav Kant via cfe-commits
pranavk wrote: This commit is still problematic. Minimal reproducer (https://godbolt.org/z/hE7M8EfT1). We should get this reverted again. https://github.com/llvm/llvm-project/pull/83124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] [NFC] Prevent null pointer dereference in Sema::InstantiateFu… (PR #89801)

2024-04-23 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/89801 …nctionDefinition In the lambda function within clang::Sema::InstantiateFunctionDefinition, the return value of a function that may return null is now checked before dereferencing to avoid potential null

[clang] [Clang] [NFC] Prevent null pointer dereference in Sema::InstantiateFunctionDefinition (PR #89801)

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

[clang] [Clang] [NFC] Prevent null pointer dereference in Sema::InstantiateFunctionDefinition (PR #89801)

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes …nctionDefinition In the lambda function within clang::Sema::InstantiateFunctionDefinition, the return value of a function that may return null is now checked before dereferencing to avoid potential null pointer

[clang] [Clang] [NFC] Prevent null pointer dereference in Sema::InstantiateFunctionDefinition (PR #89801)

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

[clang] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-23 Thread via cfe-commits
@@ -89,6 +89,19 @@ sections with improvements to Clang's support for those languages. C++ Language Changes +C++17 Feature Support +^ +- Clang now exposes ``__GCC_DESTRUCTIVE_SIZE`` and ``__GCC_CONSTRUCTIVE_SIZE`` + predefined macros

[clang] [clang-format] Correctly annotate list init braces of class types (PR #89706)

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

[clang] [clang-format] adds a space after not inside macros (PR #78176)

2024-04-23 Thread via cfe-commits
https://github.com/mydeveloperday closed https://github.com/llvm/llvm-project/pull/78176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-04-23 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/89809 Fixes #89802 >From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 23 Apr 2024 00:49:28 -0700 Subject: [PATCH] Add environment parameter to clang availability

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-23 Thread Matheus Izvekov via cfe-commits
@@ -8343,58 +8343,52 @@ bool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, // C++1z [temp.arg.template]p3: (DR 150) // A template-argument matches a template template-parameter P when P // is at least as specialized as the template-argument A.

[clang] [Clang] [NFC] Prevent null pointer dereference in Sema::InstantiateFunctionDefinition (PR #89801)

2024-04-23 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann approved this pull request. Looks good to me, thanks @smanna12! https://github.com/llvm/llvm-project/pull/89801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-04-23 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev created https://github.com/llvm/llvm-project/pull/89811 Depends on #89804. >From 8317ce33d07d0986e314de0b39aa977f784e0619 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 23 Apr 2024 18:07:06 + Subject: [PATCH 1/2] [clang-repl] Extend the C support.

[clang] [WebAssembly] Enable multivalue and reference-types in generic CPU config (PR #80923)

2024-04-23 Thread Sam Clegg via cfe-commits
@@ -147,19 +147,25 @@ void WebAssemblyTargetInfo::setFeatureEnabled(llvm::StringMap , bool WebAssemblyTargetInfo::initFeatureMap( llvm::StringMap , DiagnosticsEngine , StringRef CPU, const std::vector ) const { - if (CPU == "bleeding-edge") { -

[clang] [CMake][Release] Refactor cache file and use two stages for non-PGO builds (PR #89812)

2024-04-23 Thread Tom Stellard via cfe-commits
https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/89812 Completely refactor the cache file to simplify it and remove unnecessary variables. The main functional change here is that the non-PGO builds now use two stages, so `ninja -C build stage2-package` can be

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-23 Thread Matheus Izvekov via cfe-commits
@@ -8343,58 +8343,52 @@ bool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, // C++1z [temp.arg.template]p3: (DR 150) // A template-argument matches a template template-parameter P when P // is at least as specialized as the template-argument A.

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-23 Thread Eli Friedman via cfe-commits
@@ -2554,16 +2554,27 @@ Decl *Parser::ParseDeclarationAfterDeclarator( return ParseDeclarationAfterDeclaratorAndAttributes(D, TemplateInfo); } +static bool isConstexprVariable(const Decl *D) { + if (const VarDecl *Var = dyn_cast_if_present(D)) +return

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-23 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/89807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-23 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > How much of this is actually different from the existing target info for > AMDGCN? Seems like we're doing a lot of redundant stuff like defining macros > or features. That's part of the point, it's not actually supposed to differ in those particular regards, up to the point

[clang] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-23 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > How much of this is actually different from the existing target info for > > AMDGCN? Seems like we're doing a lot of redundant stuff like defining > > macros or features. > > That's part of the point, it's not actually supposed to differ in those > particular regards, up

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-04-23 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH 1/8] Implement a subset of builtin_cpu_supports() features ---

[clang] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-23 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > > > How much of this is actually different from the existing target info for > > > AMDGCN? Seems like we're doing a lot of redundant stuff like defining > > > macros or features. > > > > > > That's part of the point, it's not actually supposed to differ in those > >

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-23 Thread Doug Wyatt via cfe-commits
@@ -5016,3 +5041,345 @@ void AutoType::Profile(llvm::FoldingSetNodeID , const ASTContext ) { Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(), getTypeConstraintConcept(), getTypeConstraintArguments()); } + +StringRef FunctionEffect::name()

[clang] [Clang] [CodeGen] Perform derived-to-base conversion on explicit object parameter in lambda (PR #89828)

2024-04-23 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/89828 Consider this code: ```c++ template struct Overloaded : Ts... { using Ts::operator()...; }; template Overloaded(Ts...) -> Overloaded; void f() { int x; Overloaded o { [&](this auto& self) {

[clang] [Clang] [CodeGen] Perform derived-to-base conversion on explicit object parameter in lambda (PR #89828)

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (Sirraide) Changes Consider this code: ```c++ template typename... Ts struct Overloaded : Ts... { using Ts::operator()...; }; template typename... Ts Overloaded(Ts...) - OverloadedTs...; void f() { int x; Overloaded o {

[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-23 Thread Troy Butler via cfe-commits
@@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS, Instruction *CxtI, bool IsAnd, bool IsLogical = false); -

[clang] [NFC] Rename hlsl semantics to hlsl annotations (PR #89309)

2024-04-23 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/89309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Prevent null pointer dereference in Sema::InstantiateFunctionDefinition (PR #89801)

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

<    1   2   3   4   5   >