[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)

2023-11-28 Thread Alexander Richardson via cfe-commits
arichardson wrote: > > The commit message is slightly misleading, it appears there are some parts > > of the file that are actually used? > > As the commit message says, we only use > https://github.com/llvm/llvm-project/blob/main/libunwind/src/Unwind-wasm.c > and not libunwind.cpp. We don't

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-28 Thread via cfe-commits
https://github.com/tomekpaszek updated https://github.com/llvm/llvm-project/pull/70338 >From b5ba0b3fde2c6662e19dfdf96a787621ec767460 Mon Sep 17 00:00:00 2001 From: Tomek Paszek Date: Sat, 11 Nov 2023 19:38:00 +0100 Subject: [PATCH 01/15] Added an option to ignore macro definitions. --- clang

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-28 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/69734 >From a0b9798dc87b313d9dff08e9fa109bf2d65a863e Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sun, 26 Nov 2023 15:06:32 +0330 Subject: [PATCH] [clang] Non-object types are non-trivially relocatable Both ac

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-28 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/69734 >From 8cad09416a4e362ea59249e040d6e8aaee54dee3 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sun, 26 Nov 2023 15:06:32 +0330 Subject: [PATCH] [clang] Non-object types are non-trivially relocatable Both ac

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-28 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @cor3ntin I've fixed that. https://github.com/llvm/llvm-project/pull/69734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-28 Thread via cfe-commits
https://github.com/tomekpaszek updated https://github.com/llvm/llvm-project/pull/70338 >From b5ba0b3fde2c6662e19dfdf96a787621ec767460 Mon Sep 17 00:00:00 2001 From: Tomek Paszek Date: Sat, 11 Nov 2023 19:38:00 +0100 Subject: [PATCH 01/15] Added an option to ignore macro definitions. --- clang

[llvm] [clang] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2023-11-28 Thread Vikram Hegde via cfe-commits
vikramRH wrote: @arsenm , apologies for the trouble here. I should have based this out of my earlier commit. currently I do not see a way to base this patch off of my earlier commit and it might get too confusing for other reviewers if I close this and raise another review. would the individua

[clang] [analyzer] Use AllocaRegion in MallocChecker (PR #72402)

2023-11-28 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: DonatNagyE wrote: I'm merging this commit in its current shape because even if I'd reimplement a warning for the "use of `alloc(0)`", I'd do it in a separate commit. I thought about potential approaches to implement thi

[clang] [analyzer] Use AllocaRegion in MallocChecker (PR #72402)

2023-11-28 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/DonatNagyE closed https://github.com/llvm/llvm-project/pull/72402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] 0424546 - [analyzer] Use AllocaRegion in MallocChecker (#72402)

2023-11-28 Thread via cfe-commits
Author: DonatNagyE Date: 2023-11-28T16:34:44+01:00 New Revision: 0424546ed4a7570837626922edc66530cd3c3ab7 URL: https://github.com/llvm/llvm-project/commit/0424546ed4a7570837626922edc66530cd3c3ab7 DIFF: https://github.com/llvm/llvm-project/commit/0424546ed4a7570837626922edc66530cd3c3ab7.diff LO

[clang] [clang][DebugInfo] Revert to attaching DW_AT_const_value on static member declarations (PR #73626)

2023-11-28 Thread Michael Buch via cfe-commits
Michael137 wrote: > > I do wonder how feasible it would be for the downstream tests to be > > adjusted to look at the `DW_AT_location`.. > > As I mentioned on the other thread, the point is not to have to read the > value from the process-under-debug. This is not efficient in a > remote-debug

[clang] 7f3ee3c - [clang][DebugInfo] Revert to attaching DW_AT_const_value on static member declarations (#73626)

2023-11-28 Thread via cfe-commits
Author: Michael Buch Date: 2023-11-28T15:40:43Z New Revision: 7f3ee3ca1d09daf0f7d350ed9d62796640a59bf4 URL: https://github.com/llvm/llvm-project/commit/7f3ee3ca1d09daf0f7d350ed9d62796640a59bf4 DIFF: https://github.com/llvm/llvm-project/commit/7f3ee3ca1d09daf0f7d350ed9d62796640a59bf4.diff LOG:

[clang] [clang][DebugInfo] Revert to attaching DW_AT_const_value on static member declarations (PR #73626)

2023-11-28 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/73626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-11-28 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/73662 This adds support for using dominating conditions in computeKnownBits() when called from InstCombine. The implementation uses a DomConditionCache, which stores which branches may provide information that is relevan

[llvm] [clang] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-11-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-analysis @llvm/pr-subscribers-clang Author: Nikita Popov (nikic) Changes This adds support for using dominating conditions in computeKnownBits() when called from InstCombine. The implementation uses a DomConditionCache, which stores which branches

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-28 Thread via cfe-commits
https://github.com/tomekpaszek updated https://github.com/llvm/llvm-project/pull/70338 >From 25ca978ef9caf372997f2ebf227fb2b2ca443aa0 Mon Sep 17 00:00:00 2001 From: Tomek Paszek Date: Sat, 11 Nov 2023 19:38:00 +0100 Subject: [PATCH 01/15] Added an option to ignore macro definitions. --- clang

[clang] [clang][DebugInfo] Revert to attaching DW_AT_const_value on static member declarations (PR #73626)

2023-11-28 Thread Michael Buch via cfe-commits
Michael137 wrote: Looks like LLDB linux buildbot isn't happy, checking... https://github.com/llvm/llvm-project/pull/73626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (PR #72107)

2023-11-28 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: DonatNagyE wrote: Note that (if I understand it correctly) after this change the `ArrayBoundV2` check may be triggered at a slightly earlier point of the analysis and thi

[clang] [llvm] [clang][RISCV] Change default abi when only have f extension but no d extension (PR #73489)

2023-11-28 Thread Kito Cheng via cfe-commits
kito-cheng wrote: short version: GCC isn't change. long version: GCC's configure script isn't change, it's configure script in riscv-gnu-toolchain But I don't have strong opinion on this change since I believe user should explicitly specify that, otherwise it's really to screw up to select mu

[clang] [llvm] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

2023-11-28 Thread Nikita Popov via cfe-commits
nikic wrote: Just realized that this doesn't cover uses of isKnownNonNegative() in InstCombine yet, as it currently doesn't go through SimplifyQuery. I'll see about migrating those APIs tomorrow. https://github.com/llvm/llvm-project/pull/73662 ___ cf

[clang] [llvm] [clang][RISCV] Change default abi when only have f extension but no d extension (PR #73489)

2023-11-28 Thread Wang Pengcheng via cfe-commits
wangpc-pp wrote: > short version: GCC isn't change. long version: GCC's configure script isn't > change, it's configure script in riscv-gnu-toolchain So why is there a difference between GCC and riscv-gnu-toolchain? If we set `with_abi` to lp64f, what is the behavior? > > But I don't have str

[llvm] [clang] [clang, SystemZ] Pass HasDef flag to getMinGlobalAlign(). (PR #73511)

2023-11-28 Thread Jonas Paulsson via cfe-commits
@@ -1687,7 +1687,8 @@ CharUnits ASTContext::getDeclAlign(const Decl *D, bool ForAlignof) const { if (VD->hasGlobalStorage() && !ForAlignof) { uint64_t TypeSize = !BaseT->isIncompleteType() ? getTypeSize(T.getTypePtr()) : 0; -Align = std::max(A

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-28 Thread Krzysztof Parzyszek via cfe-commits
@@ -977,14 +977,63 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, +void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-28 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz edited https://github.com/llvm/llvm-project/pull/73124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Refactor ASTContext::getDeclAlign() (NFC) (PR #72977)

2023-11-28 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: Eli, are you supposed to press some button before I merge this? https://github.com/llvm/llvm-project/pull/72977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-28 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm updated https://github.com/llvm/llvm-project/pull/73124 >From 2a2693364cb8e9b657b9ff54aa78df0466b55fe4 Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Wed, 22 Nov 2023 14:22:20 +0100 Subject: [PATCH 01/14] Let the linker fail on multiple definitions of main() ---

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-28 Thread Michael Klemm via cfe-commits
@@ -977,14 +977,63 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, +void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-28 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm updated https://github.com/llvm/llvm-project/pull/73124 >From 2a2693364cb8e9b657b9ff54aa78df0466b55fe4 Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Wed, 22 Nov 2023 14:22:20 +0100 Subject: [PATCH 01/14] Let the linker fail on multiple definitions of main() ---

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-28 Thread Krzysztof Parzyszek via cfe-commits
@@ -977,14 +977,61 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, +void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-28 Thread Krzysztof Parzyszek via cfe-commits
@@ -977,14 +977,61 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, +void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-28 Thread Michael Klemm via cfe-commits
@@ -977,14 +977,61 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, +void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-28 Thread Michael Klemm via cfe-commits
@@ -977,14 +977,61 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, +void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-28 Thread Krzysztof Parzyszek via cfe-commits
@@ -977,14 +977,61 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, +void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,

[lld] [lldb] [openmp] [libcxx] [mlir] [compiler-rt] [flang] [llvm] [clang-tools-extra] [libc] [clang] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-11-28 Thread Sang Ik Lee via cfe-commits
https://github.com/silee2 updated https://github.com/llvm/llvm-project/pull/71430 >From c76403cf8629b8f7d8a5b7a3ee5da2881713a7f8 Mon Sep 17 00:00:00 2001 From: "Lee, Sang Ik" Date: Mon, 6 Nov 2023 18:47:23 + Subject: [PATCH 1/5] [MLIR] Enable GPU Dialect to SYCL runtime integration GPU Dia

[lld] [lldb] [openmp] [libcxx] [mlir] [compiler-rt] [flang] [llvm] [clang-tools-extra] [libc] [clang] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-11-28 Thread Sang Ik Lee via cfe-commits
@@ -0,0 +1,31 @@ +//===- SPIRVToLLVMIRTranslation.cpp - Translate SPIRV to LLVM IR --===// +// +// 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: Apa

[libc] [compiler-rt] [clang] [libcxx] [llvm] [lldb] [flang] [clang-tools-extra] ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-11-28 Thread via cfe-commits
cor3ntin wrote: > So it's not so much that it's not actually true in the implementation > details, it's that it's not actually true by specification either. +1. I really do not want `-E` to start not expanding, or transforming directives. I do not see a difference between a large embed and a l

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -5152,13 +5152,17 @@ Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, // and definitions of functions and variables. // C++2a [dcl.constexpr]p1: The consteval specifier shall be applied only to // the declaration of a function or function te

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -14240,6 +14294,114 @@ StmtResult Sema::ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, : IdentLoc); } +static ImplicitConversionKind getConversionKind(QualType FromType, +

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -2231,6 +2231,12 @@ static bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, return false; } + if (Info.getLangOpts().C23) { AaronBallman wrote: ```suggestion // C23 6.7.1p6: If an object or subobject declared with storage-cl

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -14240,6 +14294,114 @@ StmtResult Sema::ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, : IdentLoc); } +static ImplicitConversionKind getConversionKind(QualType FromType, AaronBallman wrot

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -7894,6 +7898,17 @@ NamedDecl *Sema::ActOnVariableDeclarator( (getLangOpts().CPlusPlus17 || Context.getTargetInfo().getCXXABI().isMicrosoft())) NewVD->setImplicitlyInline(); + +if (getLangOpts().C23) { + DeclSpec::TSCS TSC = D.getDeclSpec().ge

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -208,6 +208,7 @@ C23 Feature Support - Clang now supports which defines several macros for performing checked integer arithmetic. It is also exposed in pre-C23 modes. +- Clang now supports ``N3018 The constexpr specifier for object definitions``. Aa

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -2932,6 +2932,22 @@ def warn_private_extern : Warning< def note_private_extern : Note< "use __attribute__((visibility(\"hidden\"))) attribute instead">; +// C23 constexpr +def err_c23_thread_local_constexpr : Error< + "thread-local storage is not allowed with constexpr">

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for working on this! First round of comments done (I've not thoroughly reviewed the test cases yet though). https://github.com/llvm/llvm-project/pull/73099 ___ cfe-commits mailing list cfe-commits@l

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -4110,6 +4116,10 @@ static CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, } bool IsConstant = BaseType.isConstant(Info.Ctx); +bool ConstexprVar = false; +if (const auto *VD = dyn_cast_if_present( +Info.EvaluatingDecl.dyn_cast()

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -2932,6 +2932,22 @@ def warn_private_extern : Warning< def note_private_extern : Note< "use __attribute__((visibility(\"hidden\"))) attribute instead">; +// C23 constexpr +def err_c23_thread_local_constexpr : Error< + "thread-local storage is not allowed with constexpr">

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -14240,6 +14294,114 @@ StmtResult Sema::ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, : IdentLoc); } +static ImplicitConversionKind getConversionKind(QualType FromType, +

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

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

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -14240,6 +14294,114 @@ StmtResult Sema::ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, : IdentLoc); } +static ImplicitConversionKind getConversionKind(QualType FromType, +

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -14240,6 +14294,114 @@ StmtResult Sema::ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, : IdentLoc); } +static ImplicitConversionKind getConversionKind(QualType FromType, +

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -14397,17 +14559,21 @@ void Sema::CheckCompleteVariableDeclaration(VarDecl *var) { QualType baseType = Context.getBaseElementType(type); bool HasConstInit = true; + if (getLangOpts().C23 && var->isConstexpr() && !Init) +Diag(var->getLocation(), diag::err_constexpr

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -8857,7 +8894,9 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { if (NewVD->isConstexpr() && !T->isDependentType() && RequireLiteralType(NewVD->getLocation(), T, - diag::err_constexpr_var_non_literal)) { +

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -9237,6 +9282,22 @@ static FunctionDecl *CreateNewFunctionDecl(Sema &SemaRef, Declarator &D, FunctionDecl *NewFD = nullptr; bool isInline = D.getDeclSpec().isInlineSpecified(); + ConstexprSpecKind ConstexprKind = D.getDeclSpec().getConstexprSpecifier(); + if (Constex

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -14240,6 +14294,114 @@ StmtResult Sema::ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, : IdentLoc); } +static ImplicitConversionKind getConversionKind(QualType FromType, +

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,86 @@ +// RUN: %clang_cc1 -std=c2x -verify -triple x86_64 -pedantic -Wno-conversion -Wno-constant-conversion %s + +/* WG14 N3018: Full + * The constexpr specifier for object definitions + */ + +#define ULLONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL) +#define UINT_MAX (__INT_

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -14240,6 +14294,114 @@ StmtResult Sema::ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, : IdentLoc); } +static ImplicitConversionKind getConversionKind(QualType FromType, +

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -8605,6 +8620,28 @@ static bool checkForConflictWithNonVisibleExternC(Sema &S, const T *ND, return false; } +static bool CheckC23ConstexprVarTypeQualifiers(Sema &SemaRef, + SourceLocation VarLoc, +

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2023-11-28 Thread Aaron Ballman via cfe-commits
@@ -14240,6 +14294,114 @@ StmtResult Sema::ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, : IdentLoc); } +static ImplicitConversionKind getConversionKind(QualType FromType, +

[clang] [clang] Remove unused argument. NFC. (PR #73594)

2023-11-28 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. I can't even remember what this was supposed to do. https://github.com/llvm/llvm-project/pull/73594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-28 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm updated https://github.com/llvm/llvm-project/pull/73124 >From 2a2693364cb8e9b657b9ff54aa78df0466b55fe4 Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Wed, 22 Nov 2023 14:22:20 +0100 Subject: [PATCH 01/16] Let the linker fail on multiple definitions of main() ---

[clang-tools-extra] [llvm] [clang] [STLExtras] Add out-of-line definition of friend operator== for C++20 (PR #72348)

2023-11-28 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: Update: I verified that this change works fine with clang-17.0.6 and fails with clang-17.0.5 in C++20. https://github.com/llvm/llvm-project/pull/72348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-28 Thread Michael Klemm via cfe-commits
@@ -977,14 +977,61 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, +void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-28 Thread Michael Klemm via cfe-commits
@@ -977,14 +977,61 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, +void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-28 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm updated https://github.com/llvm/llvm-project/pull/73124 >From 2a2693364cb8e9b657b9ff54aa78df0466b55fe4 Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Wed, 22 Nov 2023 14:22:20 +0100 Subject: [PATCH 01/16] Let the linker fail on multiple definitions of main() ---

[llvm] [clang] [clang-tools-extra] [AMDGPU] Fix folding of v2i16/v2f16 splat imms (PR #72709)

2023-11-28 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec closed https://github.com/llvm/llvm-project/pull/72709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/72180 >From 6f07f561df390cfd1b0f36d510110f4daef0bc54 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Mon, 13 Nov 2023 23:54:51 + Subject: [PATCH 1/3] [clang][llvm][fatlto] Avoid cloning modules in FatLTO https://g

[llvm] [clang] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Paul Kirth via cfe-commits
@@ -1861,6 +1861,13 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, if (Args.hasArg(OPT_funified_lto)) Opts.PrepareForThinLTO = true; } + if (Arg *A = Args.getLastArg(options::OPT_ffat_lto_objects, +

[clang-tools-extra] [llvm] [clang] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-28 Thread Puyan Lotfi via cfe-commits
plotfi wrote: > Pinging @nikic for another round of review. @nikic is there more feedback or can this PR be merged? https://github.com/llvm/llvm-project/pull/68176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang-tools-extra] [llvm] [clang] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-11-28 Thread via cfe-commits
elizabethandrews wrote: Thank you reviews! I apologize for the delay in my response. I was OOO last week. I will apply review comments and push an update ASAP. https://github.com/llvm/llvm-project/pull/71706 ___ cfe-commits mailing list cfe-commits@li

[clang] 21361bb - [clang] Remove unused argument. NFC. (#73594)

2023-11-28 Thread via cfe-commits
Author: Juergen Ributzka Date: 2023-11-28T09:19:39-08:00 New Revision: 21361bb8605fd26a06312d80b9fb20a8b41c58ed URL: https://github.com/llvm/llvm-project/commit/21361bb8605fd26a06312d80b9fb20a8b41c58ed DIFF: https://github.com/llvm/llvm-project/commit/21361bb8605fd26a06312d80b9fb20a8b41c58ed.di

[clang] [clang] Remove unused argument. NFC. (PR #73594)

2023-11-28 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka closed https://github.com/llvm/llvm-project/pull/73594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Warn when calling a NEON builtin in a streaming function (PR #73672)

2023-11-28 Thread Sam Tebbs via cfe-commits
https://github.com/SamTebbs33 created https://github.com/llvm/llvm-project/pull/73672 This patch introduces a warning that is emitted when a Neon builtin is called from a streaming function, as that situation is not supported. Uses work by Kerry McLaughlin. >From 96464a9c37a532216e4df6c003aa1

[llvm] [clang] [clang, SystemZ] Pass HasDef flag to getMinGlobalAlign(). (PR #73511)

2023-11-28 Thread Ulrich Weigand via cfe-commits
@@ -1687,7 +1687,8 @@ CharUnits ASTContext::getDeclAlign(const Decl *D, bool ForAlignof) const { if (VD->hasGlobalStorage() && !ForAlignof) { uint64_t TypeSize = !BaseT->isIncompleteType() ? getTypeSize(T.getTypePtr()) : 0; -Align = std::max(A

[llvm] [clang] [clang, SystemZ] Pass HasDef flag to getMinGlobalAlign(). (PR #73511)

2023-11-28 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/73511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Warn when calling a NEON builtin in a streaming function (PR #73672)

2023-11-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sam Tebbs (SamTebbs33) Changes This patch introduces a warning that is emitted when a Neon builtin is called from a streaming function, as that situation is not supported. Uses work by Kerry McLaughlin. --- Full diff: https://github.com/

[lld] [lldb] [clang] [mlir] [compiler-rt] [clang-tools-extra] [llvm] [libcxx] [libc++][ranges] Implement ranges::contains_subrange (PR #66963)

2023-11-28 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/66963 >From 5a2c930770cf548c5e3f3451e76b48cb067e6762 Mon Sep 17 00:00:00 2001 From: Zijun Zhao Date: Wed, 13 Sep 2023 14:26:01 -0700 Subject: [PATCH 1/6] [libc++] Implement ranges::contains_subrange --- libcxx/i

[lld] [lldb] [clang] [mlir] [compiler-rt] [clang-tools-extra] [llvm] [libcxx] [libc++][ranges] Implement ranges::contains_subrange (PR #66963)

2023-11-28 Thread via cfe-commits
ZijunZhaoCCK wrote: > Gentle ping. There's outstanding feedback to address on this review. > @ZijunZhaoCCK if you don't think you'll have time to pursue this PR anymore, > it's all good but please let us know so we can assign it to someone else! Sorry for the late reply! I can’t make it a prio

[openmp] [llvm] [mlir] [clang] [OpenMP] Introduce the KernelLaunchEnvironment as implicit argument (PR #70401)

2023-11-28 Thread via cfe-commits
ronlieb wrote: @jdoerfert please respond to our comments about peformance degradation ? https://github.com/llvm/llvm-project/pull/70401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-28 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz approved this pull request. https://github.com/llvm/llvm-project/pull/73124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [compiler-rt] [flang] [libc] [llvm] [clang] [Clang] Use correct base expression for counted_by field (#73168) (PR #73465)

2023-11-28 Thread Nathan Chancellor via cfe-commits
nathanchance wrote: For what it's worth, this resolves both the issues that I reported at https://github.com/llvm/llvm-project/issues/73168, at least when building the full two files that I noticed had a problem before. I can do more builds later if necessary. https://github.com/llvm/llvm-pro

[clang] [llvm] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Teresa Johnson via cfe-commits
https://github.com/teresajohnson approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/72180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Nikita Popov via cfe-commits
@@ -29,30 +29,31 @@ Overview Within LLVM, FatLTO is supported by choosing the ``FatLTODefaultPipeline``. This pipeline will: -#) Clone the IR module. -#) Run the pre-link (Thin)LTO pipeline using the cloned module. +#) Run the pre-link UnifiedLTO pipeline on the current module

[clang] [llvm] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Nikita Popov via cfe-commits
nikic wrote: I like the approach of saying that FatLTO implies UnifiedLTO. This nicely justifies why we are always using the ThinLTO pre-link pipeline. https://github.com/llvm/llvm-project/pull/72180 ___ cfe-commits mailing list cfe-commits@lists.llvm

[llvm] [libcxx] [clang-tools-extra] [clang] Mark some std::string functions noinline. (PR #72869)

2023-11-28 Thread James Y Knight via cfe-commits
jyknight wrote: Seeing no further feedback, going ahead and submitting. https://github.com/llvm/llvm-project/pull/72869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Nikita Popov via cfe-commits
@@ -1530,14 +1530,11 @@ PassBuilder::buildPerModuleDefaultPipeline(OptimizationLevel Level, } ModulePassManager -PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO, -bool EmitSummary) { +PassBuilder::buildFatL

[llvm] [clang] AArch64: add support for currently released Apple CPUs. (PR #73499)

2023-11-28 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha approved this pull request. https://github.com/llvm/llvm-project/pull/73499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Paul Kirth via cfe-commits
@@ -1530,14 +1530,11 @@ PassBuilder::buildPerModuleDefaultPipeline(OptimizationLevel Level, } ModulePassManager -PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO, -bool EmitSummary) { +PassBuilder::buildFatL

[clang] [clang] Fix sorting header paths (PR #73323)

2023-11-28 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: You could try using `clang -cc1 -E -x c-module-map` which calls `Module::print`. To trigger this code path you can follow the pattern in `darwin_specific_modulemap_hacks.m`, ie create a module like ``` $ touch Tcl/x1.h $ touch Tcl/x2.h $ cat Tcl/module.modulemap module Tcl {

[clang] [Clang] Eagerly instantiate used constexpr function upon definition. (PR #73463)

2023-11-28 Thread Richard Smith via cfe-commits
zygoloid wrote: > > I _think_ the new map should be unnecessary: `FunctionTemplateDecl` and > > `VarTemplateDecl` already have a list of specializations that you can walk > > and check the point of instantiation and template specialization kind to > > see if there's a pending instantiation. >

[llvm] [clang] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/72180 >From 6f07f561df390cfd1b0f36d510110f4daef0bc54 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Mon, 13 Nov 2023 23:54:51 + Subject: [PATCH 1/4] [clang][llvm][fatlto] Avoid cloning modules in FatLTO https://g

[llvm] [clang] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Paul Kirth via cfe-commits
@@ -29,30 +29,31 @@ Overview Within LLVM, FatLTO is supported by choosing the ``FatLTODefaultPipeline``. This pipeline will: -#) Clone the IR module. -#) Run the pre-link (Thin)LTO pipeline using the cloned module. +#) Run the pre-link UnifiedLTO pipeline on the current module

[clang] 98e674c - [clang] Non-object types are non-trivially relocatable (#69734)

2023-11-28 Thread via cfe-commits
Author: Amirreza Ashouri Date: 2023-11-28T19:44:38+01:00 New Revision: 98e674c9f16d677d95c67bc130e267fae331e43c URL: https://github.com/llvm/llvm-project/commit/98e674c9f16d677d95c67bc130e267fae331e43c DIFF: https://github.com/llvm/llvm-project/commit/98e674c9f16d677d95c67bc130e267fae331e43c.di

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-28 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/69734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [libcxx] [compiler-rt] [clang] [clang-tools-extra] [mlir] [flang] [llvm] [sanitizer_symbolizer] RenderContextual elements for symbolizer markup. (PR #73194)

2023-11-28 Thread Andres Villegas via cfe-commits
@@ -64,4 +66,111 @@ const char *MarkupSymbolizerTool::Demangle(const char *name) { return buffer; } +// Fuchsia's implementation of symbolizer markup doesn't need to emit contextual +// elements at this point. +// Fuchsia's logging infrastructure emits enough information a

[llvm] [clang] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Nikita Popov via cfe-commits
@@ -1530,14 +1530,11 @@ PassBuilder::buildPerModuleDefaultPipeline(OptimizationLevel Level, } ModulePassManager -PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO, -bool EmitSummary) { +PassBuilder::buildFatL

[llvm] [clang] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Nikita Popov via cfe-commits
@@ -1530,14 +1530,11 @@ PassBuilder::buildPerModuleDefaultPipeline(OptimizationLevel Level, } ModulePassManager -PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO, -bool EmitSummary) { +PassBuilder::buildFatL

[llvm] [clang] [MemProf] Expand optimization scope to internal linakge function (PR #73236)

2023-11-28 Thread Snehasish Kumar via cfe-commits
snehasish wrote: > change the matcher (the latter may be the easiest). My response assumed that it was already using the IRPGOFuncName for matching. Yes, I think we should make the switch then. > It seems dwarf don't record linkage type. Yes, you're right. As an alternative can we use the sym

[llvm] [clang] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)

2023-11-28 Thread Paul Kirth via cfe-commits
@@ -1530,14 +1530,11 @@ PassBuilder::buildPerModuleDefaultPipeline(OptimizationLevel Level, } ModulePassManager -PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO, -bool EmitSummary) { +PassBuilder::buildFatL

[llvm] [clang] [flang] [Flang] Add code-object-version option (PR #72638)

2023-11-28 Thread Jan Leyonberg via cfe-commits
https://github.com/jsjodin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/72638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Eagerly instantiate used constexpr function upon definition. (PR #73463)

2023-11-28 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/73463 >From a1d36de81074ad17bc5d22a4c5906f5a0bfa65c4 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sun, 26 Nov 2023 22:47:51 +0100 Subject: [PATCH 1/2] [Clang] Eagerly instantiate used constexpr function upon d

<    1   2   3   4   >