[clang] [Clang][Parse] Fix ambiguity with nested-name-specifiers that may declarative (PR #96364)

2024-07-02 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Ping @mizvekov @AaronBallman @cor3ntin https://github.com/llvm/llvm-project/pull/96364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-07-02 Thread Akira Hatanaka via cfe-commits
@@ -2220,6 +2220,11 @@ llvm::Constant *ConstantLValueEmitter::emitPointerAuthPointer(const Expr *E) { // The assertions here are all checked by Sema. assert(Result.Val.isLValue()); + auto *Base = Result.Val.getLValueBase().get(); + if (auto *Decl = dyn_cast_or_null(Base

[clang] [Clang] Introduce 'clang-nvlink-wrapper' to work around 'nvlink' (PR #96561)

2024-07-02 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/96561 >From 3b10fce6b3d3f8eeb7bd9a3828d488362bb061dd Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 24 Jun 2024 15:14:52 -0500 Subject: [PATCH] [Clang] Introduce 'clang-nvlink-wrappaer' to work around 'nvlink'

[clang] [C2y] Remove support for _Imaginary (PR #97436)

2024-07-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes WG14 N3274 removed _Imaginary from Annex G. Clang has never fully supported Annex G or _Imaginary, so removal is pretty trivial for us. Note, we are keeping _Imaginar

[clang] [C2y] Remove support for _Imaginary (PR #97436)

2024-07-02 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 a0ab0ca7a733eb9e8e6442676a974ff8a2cdb930 1e7a4900130117dc4c215e5ee1fab481f129a01a --

[clang] [HLSL] Run availability diagnostic on exported functions (PR #97352)

2024-07-02 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/97352 >From b67ecd20cc2c11f4f99c2d90c95fdbd988659947 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 26 Jun 2024 12:31:39 -0700 Subject: [PATCH 1/6] [HLSL] Implement `export` keyword Fixes #92812 --- .../clang/

[clang] [flang] [flang] Implement -mcmodel flag (PR #95411)

2024-07-02 Thread Thirumalai Shaktivel via cfe-commits
Thirumalai-Shaktivel wrote: Yes, I tested it. It works fine. Thank you! https://github.com/llvm/llvm-project/pull/95411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] AMDGPU: Add a subtarget feature for fine-grained remote memory support (PR #96442)

2024-07-02 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/96442 >From cd95b668b34f5d0834b16f441ab131003988266b Mon Sep 17 00:00:00 2001 From: martinboehme Date: Wed, 26 Jun 2024 15:01:57 +0200 Subject: [PATCH 01/14] [clang][dataflow] Teach `AnalysisASTVisitor` that `typeid()`

[clang] [libc] [llvm] AMDGPU: Add a subtarget feature for fine-grained remote memory support (PR #96442)

2024-07-02 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 87de49753d4bd860fed5165e9411c703107ad3a5 8a87e14737f121a931fe7f1b15f5263627fc883d --

[clang] [lldb] [clang][RecordLayoutBuilder] Be stricter about inferring packed-ness in ExternalLayouts (PR #97443)

2024-07-02 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/97443 This patch is motivated by the LLDB support required for: https://github.com/llvm/llvm-project/issues/93069 In the presence of `[[no_unique_address]]`, LLDB may ask Clang to lay out types with overlapping fi

[clang] [lldb] [clang][RecordLayoutBuilder] Be stricter about inferring packed-ness in ExternalLayouts (PR #97443)

2024-07-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Buch (Michael137) Changes This patch is motivated by the LLDB support required for: https://github.com/llvm/llvm-project/issues/93069 In the presence of `[[no_unique_address]]`, LLDB may ask Clang to lay out types with overlappin

[clang] [Bounds-Safety] Add sized_by, counted_by_or_null & sized_by_or_null (PR #93231)

2024-07-02 Thread Yeoul Na via cfe-commits
rapidsna wrote: Still LGTM https://github.com/llvm/llvm-project/pull/93231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][OpenMP] Change `ActOnOpenMPRegionStart` to use captured regions (PR #97445)

2024-07-02 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/97445 Instead of checking specific directives, this function now gets the list of captured regions, and processes them individually. This makes this function directive-agnostic (except a few cases of leaf constructs)

[clang] [clang][OpenMP] Use leaf constructs in `mapLoopConstruct` (PR #97446)

2024-07-02 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/97446 This removes mentions of specific combined directives. Also, add a quote from the OpenMP spec to explain the code dealing with the `bind` clause. >From 316d5a11bd7f6afb99cd7d25baf43ec2679561dc Mon Sep 17 00:00

[clang] [clang][OpenMP] Change `ActOnOpenMPRegionStart` to use captured regions (PR #97445)

2024-07-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krzysztof Parzyszek (kparzysz) Changes Instead of checking specific directives, this function now gets the list of captured regions, and processes them individually. This makes this function directive-agnostic (except a few cases of leaf

[clang] [clang][OpenMP] Use leaf constructs in `mapLoopConstruct` (PR #97446)

2024-07-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krzysztof Parzyszek (kparzysz) Changes This removes mentions of specific combined directives. Also, add a quote from the OpenMP spec to explain the code dealing with the `bind` clause. --- Full diff: https://github.com/llvm/llvm-project/

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-07-02 Thread Akira Hatanaka via cfe-commits
@@ -3140,6 +3140,269 @@ ASTContext::getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD) { return llvm::getPointerAuthStableSipHash(Str); } +/// Encode a function type for use in the discriminator of a function pointer +/// type. We can't use the itanium scheme

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-07-02 Thread Akira Hatanaka via cfe-commits
@@ -2220,6 +2220,11 @@ llvm::Constant *ConstantLValueEmitter::emitPointerAuthPointer(const Expr *E) { // The assertions here are all checked by Sema. assert(Result.Val.isLValue()); + auto *Base = Result.Val.getLValueBase().get(); + if (auto *Decl = dyn_cast_or_null(Base

[clang] [Clang][Sema] Diagnose variable template explicit specializations with storage-class-specifiers (PR #93873)

2024-07-02 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Thanks for proposing a fix! I've been hinted though that Clang may be incorrect in accepting explicit specializations of a templated static class data member in the class scope. It looks like with all the restrictions in the standard it may only be allowed to place explicit speci

[clang] [llvm] [Clang][Coroutines] Introducing the `[[clang::coro_inplace_task]]` attribute (PR #94693)

2024-07-02 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/94693 >From 3806693511b157f7fbeb4d7008231d59fb45b528 Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Tue, 4 Jun 2024 23:22:00 -0700 Subject: [PATCH] [Clang] Introduce [[clang::coro_inplace_task]] --- clang/in

[clang] [llvm] Remove llvm/MC/MCAsmLayout.h and the unused parameter in MCAssembler::layout (PR #97449)

2024-07-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/97449 This restores 63ec52f867ada8d841dd872acf3d0cb62e2a99e8 and 46f7929879a59ec72dc75679b4201e2d314efba9, NFC changes that were unnecessarily reverted. This completes the work that merges MCAsmLayout into MCAssembler.

[clang] [llvm] Remove llvm/MC/MCAsmLayout.h and the unused parameter in MCAssembler::layout (PR #97449)

2024-07-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Fangrui Song (MaskRay) Changes This restores 63ec52f867ada8d841dd872acf3d0cb62e2a99e8 and 46f7929879a59ec72dc75679b4201e2d314efba9, NFC changes that were unnecessarily reverted. This completes the work that merges MCAsmLayout into MCAssembler

[clang] [lldb] [clang][RecordLayoutBuilder] Be stricter about inferring packed-ness in ExternalLayouts (PR #97443)

2024-07-02 Thread Michael Buch via cfe-commits
@@ -2250,14 +2246,18 @@ void ItaniumRecordLayoutBuilder::UpdateAlignment( } } -uint64_t -ItaniumRecordLayoutBuilder::updateExternalFieldOffset(const FieldDecl *Field, - uint64_t ComputedOffset) { +uint64_t ItaniumRecordLa

[clang] [clang][modules] Fix use-after-free in header serialization (PR #96356)

2024-07-02 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Ping @vsapsai. https://github.com/llvm/llvm-project/pull/96356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [Support] Move raw_ostream::tie to raw_fd_ostream (PR #97396)

2024-07-02 Thread Fangrui Song via cfe-commits
MaskRay wrote: Unneeded `tie` for non-fd streams do cause performance issues. I recall that `flush_tied_then_write` contributed noticeable overhead in MC: https://reviews.llvm.org/D145791#4185609 https://github.com/llvm/llvm-project/pull/97396 ___ c

[clang-tools-extra] [llvm] [Support] Move raw_ostream::tie to raw_fd_ostream (PR #97396)

2024-07-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/97396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC][Driver] Implement `-mbranch-protection=pauthabi` option (PR #97237)

2024-07-02 Thread Peter Smith via cfe-commits
@@ -1537,11 +1570,16 @@ static void CollectARMPACBTIOptions(const ToolChain &TC, const ArgList &Args, if (!isAArch64 && PBP.Key == "b_key") D.Diag(diag::warn_unsupported_branch_protection) << "b-key" << A->getAsString(Args); +if (!isAArch64 && PBP.HasPa

[clang] [llvm] [PAC][Driver] Implement `-mbranch-protection=pauthabi` option (PR #97237)

2024-07-02 Thread Peter Smith via cfe-commits
https://github.com/smithp35 commented: I'm wondering if it is worth resurrecting https://discourse.llvm.org/t/aarch64-pauthabi-options-for-command-line-options-to-use-the-pauthabi-and-set-signing-schema/73479 to see if we can get some more visibility on this. It has also been almost a year sin

[clang] [llvm] [PAC][Driver] Implement `-mbranch-protection=pauthabi` option (PR #97237)

2024-07-02 Thread Peter Smith via cfe-commits
https://github.com/smithp35 edited https://github.com/llvm/llvm-project/pull/97237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnose variable template explicit specializations with storage-class-specifiers (PR #93873)

2024-07-02 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: > I've been hinted though that Clang may be incorrect in accepting explicit > specializations of a templated static class data member in the class scope. > It looks like with all the restrictions in the standard it may only be > allowed to place explicit specializations of a

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-07-02 Thread via cfe-commits
https://github.com/mahesh-attarde updated https://github.com/llvm/llvm-project/pull/95904 >From 6d6619f8f7a37906ac45791487a4d63b51a48ad1 Mon Sep 17 00:00:00 2001 From: mahesh-attarde Date: Wed, 12 Jun 2024 06:15:51 -0700 Subject: [PATCH 01/11] added regcall strct by reg support --- clang/lib/

[clang] [NFC] Add assertion to ensure FiniteMathOnly is in sync with HonorINFs and HonorNANs. (PR #97342)

2024-07-02 Thread Zahira Ammarguellat via cfe-commits
@@ -816,6 +816,11 @@ class FPOptions { setAllowFPReassociate(LO.AllowFPReassoc); setNoHonorNaNs(LO.NoHonorNaNs); setNoHonorInfs(LO.NoHonorInfs); +// Ensure that if FiniteMathOnly is enabled, NoHonorNaNs and NoHonorInfs are +// also enabled. This is because

[clang] [Clang][Sema] Fix crash when rebuilding MemberExprs with invalid object expressions (PR #97455)

2024-07-02 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/97455 Fixes #95778 >From 5eb3be349b8ca816bec672a6a423f28c4a50b63c Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 2 Jul 2024 14:03:45 -0400 Subject: [PATCH] [Clang][Sema] Fix crash when rebuilding Mem

[clang] [Clang][Sema] Fix crash when rebuilding MemberExprs with invalid object expressions (PR #97455)

2024-07-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes Fixes #95778 --- Full diff: https://github.com/llvm/llvm-project/pull/97455.diff 2 Files Affected: - (modified) clang/lib/Sema/TreeTransform.h (+3) - (modified) clang/test/CXX/temp/temp.res/temp

[libc] [libunwind] [WIP] Enough to get `libc` to build `clang` on `aarch64` (PR #97231)

2024-07-02 Thread Izaak Schroeder via cfe-commits
https://github.com/izaakschroeder updated https://github.com/llvm/llvm-project/pull/97231 >From 31dc769c1866a4a0100dde0a3743c215a9a5f5eb Mon Sep 17 00:00:00 2001 From: Izaak Schroeder Date: Sun, 30 Jun 2024 13:33:16 -0700 Subject: [PATCH 01/20] [libc]: add missing aarch64 headers --- libc/con

[clang] [llvm] [Hashing] Use a non-deterministic seed if LLVM_ENABLE_ABI_BREAKING_CHECKS (PR #96282)

2024-07-02 Thread Fangrui Song via cfe-commits
@@ -322,24 +306,20 @@ struct hash_state { } }; - -/// A global, fixed seed-override variable. -/// -/// This variable can be set using the \see llvm::set_fixed_execution_seed -/// function. See that function for details. Do not, under any circumstances, -/// set or read this

[clang] [llvm] [Hashing] Use a non-deterministic seed if LLVM_ENABLE_ABI_BREAKING_CHECKS (PR #96282)

2024-07-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/96282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-07-02 Thread Joseph Huber via cfe-commits
jhuber6 wrote: This patch causes the `offloading/bug51781.c` test to fail when compiled with reductions + debug information. ```console > clang ../offload/test/offloading/bug51781.c -fopenmp -O1 --offload-arch=sm_89 > -DADD_REDUCTION --offload-device-only -gline-tables-only !dbg attachment poin

[libc] [libunwind] [WIP] Enough to get `libc` to build `clang` on `aarch64` (PR #97231)

2024-07-02 Thread Izaak Schroeder via cfe-commits
https://github.com/izaakschroeder updated https://github.com/llvm/llvm-project/pull/97231 >From 31dc769c1866a4a0100dde0a3743c215a9a5f5eb Mon Sep 17 00:00:00 2001 From: Izaak Schroeder Date: Sun, 30 Jun 2024 13:33:16 -0700 Subject: [PATCH 01/20] [libc]: add missing aarch64 headers --- libc/con

[libc] [libunwind] [WIP] Enough to get `libc` to build `clang` on `aarch64` (PR #97231)

2024-07-02 Thread Izaak Schroeder via cfe-commits
https://github.com/izaakschroeder updated https://github.com/llvm/llvm-project/pull/97231 >From 31dc769c1866a4a0100dde0a3743c215a9a5f5eb Mon Sep 17 00:00:00 2001 From: Izaak Schroeder Date: Sun, 30 Jun 2024 13:33:16 -0700 Subject: [PATCH 01/20] [libc]: add missing aarch64 headers --- libc/con

[clang] [llvm] [Hashing] Use a non-deterministic seed if LLVM_ENABLE_ABI_BREAKING_CHECKS (PR #96282)

2024-07-02 Thread Nikita Popov via cfe-commits
@@ -322,24 +306,20 @@ struct hash_state { } }; - -/// A global, fixed seed-override variable. -/// -/// This variable can be set using the \see llvm::set_fixed_execution_seed -/// function. See that function for details. Do not, under any circumstances, -/// set or read this

[libc] [libunwind] [WIP] Enough to get `libc` to build `clang` on `aarch64` (PR #97231)

2024-07-02 Thread Izaak Schroeder via cfe-commits
https://github.com/izaakschroeder updated https://github.com/llvm/llvm-project/pull/97231 >From 31dc769c1866a4a0100dde0a3743c215a9a5f5eb Mon Sep 17 00:00:00 2001 From: Izaak Schroeder Date: Sun, 30 Jun 2024 13:33:16 -0700 Subject: [PATCH 01/20] [libc]: add missing aarch64 headers --- libc/con

[clang] [NFC] Add assertion to ensure FiniteMathOnly is in sync with HonorINFs and HonorNANs. (PR #97342)

2024-07-02 Thread Aaron Ballman via cfe-commits
@@ -816,6 +816,11 @@ class FPOptions { setAllowFPReassociate(LO.AllowFPReassoc); setNoHonorNaNs(LO.NoHonorNaNs); setNoHonorInfs(LO.NoHonorInfs); +// Ensure that if FiniteMathOnly is enabled, NoHonorNaNs and NoHonorInfs are +// also enabled. This is because

[clang] [Driver] Add -Wa, options --crel and --allow-experimental-crel (PR #97378)

2024-07-02 Thread David Blaikie via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: not %clang -### -c --target=x86_64 -Wa,--crel %s 2>&1 | FileCheck %s --check-prefix=NOEXP + +// NOEXP: error: -Wa,--allow-experimental-crel must be specified to use -Wa,--crel. CREL is experimental and takes a non-standard section type code + +// RUN: %

[libc] [libcxx] [libunwind] [WIP] Enough to get `libc` to build `clang` on `aarch64` (PR #97231)

2024-07-02 Thread Izaak Schroeder via cfe-commits
https://github.com/izaakschroeder updated https://github.com/llvm/llvm-project/pull/97231 >From 31dc769c1866a4a0100dde0a3743c215a9a5f5eb Mon Sep 17 00:00:00 2001 From: Izaak Schroeder Date: Sun, 30 Jun 2024 13:33:16 -0700 Subject: [PATCH 01/21] [libc]: add missing aarch64 headers --- libc/con

[clang] 072e81d - Revert "[Clang][Comments] Attach comments to decl even if preproc directives are in between (#88367)"

2024-07-02 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-07-02T14:45:52-04:00 New Revision: 072e81db7a974bfb27b9b65d73330de7dd739821 URL: https://github.com/llvm/llvm-project/commit/072e81db7a974bfb27b9b65d73330de7dd739821 DIFF: https://github.com/llvm/llvm-project/commit/072e81db7a974bfb27b9b65d73330de7dd739821.diff

[clang] [Clang][Comments] Attach comments to decl even if preproc directives are in between (PR #88367)

2024-07-02 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Thanks for the post-commit feedback! I've reverted the changes in 072e81db7a974bfb27b9b65d73330de7dd739821 so that @hdoc can investigate further. https://github.com/llvm/llvm-project/pull/88367 ___ cfe-commits mailing list cfe-comm

[libc] [libcxx] [libunwind] [WIP] Enough to get `libc` to build `clang` on `aarch64` (PR #97231)

2024-07-02 Thread Izaak Schroeder via cfe-commits
https://github.com/izaakschroeder updated https://github.com/llvm/llvm-project/pull/97231 >From 31dc769c1866a4a0100dde0a3743c215a9a5f5eb Mon Sep 17 00:00:00 2001 From: Izaak Schroeder Date: Sun, 30 Jun 2024 13:33:16 -0700 Subject: [PATCH 01/22] [libc]: add missing aarch64 headers --- libc/con

[clang] [Doc] Update documentation for no-transitive-change (PR #96453)

2024-07-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM but please wait for other active reviewers to sign off before landing. https://github.com/llvm/llvm-project/pull/96453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [Clang] [C23] Implement N2653: u8 strings are char8_t[] (PR #97208)

2024-07-02 Thread Aaron Ballman via cfe-commits
@@ -1342,8 +1342,10 @@ static void InitializePredefinedMacros(const TargetInfo &TI, getLockFreeValue(TI.get##Type##Width(), TI)); DEFINE_LOCK_FREE_MACRO(BOOL, Bool); DEFINE_LOCK_FREE_MACRO(CHAR, Char); -if (LangOpts.Char8) - DEFINE_LOCK_F

[libc] [libcxx] [libunwind] [WIP] Enough to get `libc` to build `clang` on `aarch64` (PR #97231)

2024-07-02 Thread Izaak Schroeder via cfe-commits
https://github.com/izaakschroeder updated https://github.com/llvm/llvm-project/pull/97231 >From 31dc769c1866a4a0100dde0a3743c215a9a5f5eb Mon Sep 17 00:00:00 2001 From: Izaak Schroeder Date: Sun, 30 Jun 2024 13:33:16 -0700 Subject: [PATCH 01/23] [libc]: add missing aarch64 headers --- libc/con

[clang] [NFC] Add assertion to ensure FiniteMathOnly is in sync with HonorINFs and HonorNANs. (PR #97342)

2024-07-02 Thread Zahira Ammarguellat via cfe-commits
@@ -816,6 +816,11 @@ class FPOptions { setAllowFPReassociate(LO.AllowFPReassoc); setNoHonorNaNs(LO.NoHonorNaNs); setNoHonorInfs(LO.NoHonorInfs); +// Ensure that if FiniteMathOnly is enabled, NoHonorNaNs and NoHonorInfs are +// also enabled. This is because

[clang] [Clang] [C23] Implement N2653: u8 strings are char8_t[] (PR #97208)

2024-07-02 Thread Aaron Ballman via cfe-commits
@@ -104,6 +107,7 @@ typedef _Atomic(long) atomic_long; typedef _Atomic(unsigned long) atomic_ulong; typedef _Atomic(long long) atomic_llong; typedef _Atomic(unsigned long long) atomic_ullong; +typedef _Atomic(unsigned char) atomic_char8_t; type

[clang] [Clang] [C23] Implement N2653: u8 strings are char8_t[] (PR #97208)

2024-07-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/97208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [UVT] add update-verify-tests.py (PR #97369)

2024-07-02 Thread Henrik G. Olsson via cfe-commits
hnrklssn wrote: > This is a nice addition, but I think it should follow the conventions > established by the existing update_*_test_checks.py scripts as much as > possible, at least: > > * Ability to parse RUN lines, re-execute them autonomously, and modify > test files in place based on

[clang] [Clang][Sema] Diagnose variable template explicit specializations with storage-class-specifiers (PR #93873)

2024-07-02 Thread David Blaikie via cfe-commits
dwblaikie wrote: > It looks like the presence of `static` on template variable specializations > makes difference in the namespace context: https://gcc.godbolt.org/z/WGsreqbz8 > > Specifically, the specializations not marked `static` result in an exported > variable. Thus, we have seemingly va

[clang] [llvm] [CUDA] Add support for CUDA-12.6 and sm_100 (PR #97402)

2024-07-02 Thread Sergey Kozub via cfe-commits
https://github.com/sergey-kozub converted_to_draft https://github.com/llvm/llvm-project/pull/97402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2024-07-02 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. I think this looks good, then. Any other concerns? https://github.com/llvm/llvm-project/pull/96422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[libc] [libcxx] [libunwind] [WIP] Enough to get `libc` to build `clang` on `aarch64` (PR #97231)

2024-07-02 Thread Izaak Schroeder via cfe-commits
https://github.com/izaakschroeder updated https://github.com/llvm/llvm-project/pull/97231 >From 31dc769c1866a4a0100dde0a3743c215a9a5f5eb Mon Sep 17 00:00:00 2001 From: Izaak Schroeder Date: Sun, 30 Jun 2024 13:33:16 -0700 Subject: [PATCH 01/24] [libc]: add missing aarch64 headers --- libc/con

[clang] [llvm] [CUDA] Add support for CUDA-12.6 and sm_100 (PR #97402)

2024-07-02 Thread Sergey Kozub via cfe-commits
https://github.com/sergey-kozub updated https://github.com/llvm/llvm-project/pull/97402 >From 02e1acff6ffa1ddc3a26b0edc7e89923ac38978f Mon Sep 17 00:00:00 2001 From: Sergey Kozub Date: Tue, 2 Jul 2024 02:44:56 -0700 Subject: [PATCH] [CUDA] Add support for CUDA-12.6 and sm_100 --- clang/docs/R

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-07-02 Thread Eli Friedman via cfe-commits
@@ -2220,6 +2220,11 @@ llvm::Constant *ConstantLValueEmitter::emitPointerAuthPointer(const Expr *E) { // The assertions here are all checked by Sema. assert(Result.Val.isLValue()); + auto *Base = Result.Val.getLValueBase().get(); + if (auto *Decl = dyn_cast_or_null(Base

[clang] [Clang] fix cast failures by adjusting the resolution of record declaration contexts to handle semantic and lexical distinctions (PR #96228)

2024-07-02 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/96228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix cast failures by adjusting the resolution of record declaration contexts to handle semantic and lexical distinctions (PR #96228)

2024-07-02 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s a-tarasyuk wrote: @shafik could you review the latest changes? thanks https://github.com/llvm/llvm-project/pull/96228 ___ cfe-commits mailing lis

[clang] [clang] inherit GD to let the codegen add kcfi type for ifunc (PR #96400)

2024-07-02 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Probably you want a dedicated codepath for computing the right kcfi type for resolvers. https://github.com/llvm/llvm-project/pull/96400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [clang][OpenMP] Use leaf constructs in `mapLoopConstruct` (PR #97446)

2024-07-02 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/97446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][OpenMP] Use leaf constructs in `mapLoopConstruct` (PR #97446)

2024-07-02 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG with a nit https://github.com/llvm/llvm-project/pull/97446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][OpenMP] Use leaf constructs in `mapLoopConstruct` (PR #97446)

2024-07-02 Thread Alexey Bataev via cfe-commits
@@ -6270,16 +6270,20 @@ bool SemaOpenMP::mapLoopConstruct( if (BindKind == OMPC_BIND_unknown) { // Setting the enclosing teams or parallel construct for the loop // directive without bind clause. + // [5.0:129:25-28] If the bind clause is not present on the

[clang] [clang][OpenMP] Change `ActOnOpenMPRegionStart` to use captured regions (PR #97445)

2024-07-02 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/97445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Add support for OpenBSD's syslog format attribute (PR #97366)

2024-07-02 Thread via cfe-commits
https://github.com/Sirraide commented: Hmm, this function also seems to exist on Linux, though. Additionally, from my `man syslog` docs: > The remaining arguments are a format, as in `printf(3)`, and any arguments > required by the format, except that the two-character sequence `%m` will be >

[clang] [clang][OpenMP] Use leaf constructs in `mapLoopConstruct` (PR #97446)

2024-07-02 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/97446 >From 316d5a11bd7f6afb99cd7d25baf43ec2679561dc Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Mon, 1 Jul 2024 15:18:07 -0500 Subject: [PATCH 1/2] [clang][OpenMP] Use leaf constructs in `mapLoopConstruc

[clang] [clang][OpenMP] Use leaf constructs in `mapLoopConstruct` (PR #97446)

2024-07-02 Thread Krzysztof Parzyszek via cfe-commits
@@ -6270,16 +6270,20 @@ bool SemaOpenMP::mapLoopConstruct( if (BindKind == OMPC_BIND_unknown) { // Setting the enclosing teams or parallel construct for the loop // directive without bind clause. + // [5.0:129:25-28] If the bind clause is not present on the

[clang] [clang][OpenMP] Use leaf constructs in `mapLoopConstruct` (PR #97446)

2024-07-02 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/97446 >From 316d5a11bd7f6afb99cd7d25baf43ec2679561dc Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Mon, 1 Jul 2024 15:18:07 -0500 Subject: [PATCH 1/3] [clang][OpenMP] Use leaf constructs in `mapLoopConstruc

[clang] [clang] Extend lifetimebound analysis to detect within-initializer assignments between pointer-like objects. (PR #97473)

2024-07-02 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/97473 This patch extend the lifetimebound analysis to cover assignments between pointer-like objects (`gsl::Pointer`). Specifically, it tracks the RHS of assignment operators to determine if it points to a temporary ob

[clang] [clang] Extend lifetimebound analysis to detect within-initializer assignments between pointer-like objects. (PR #97473)

2024-07-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes This patch extend the lifetimebound analysis to cover assignments between pointer-like objects (`gsl::Pointer`). Specifically, it tracks the RHS of assignment operators to determine if it points to a temporary

[clang] [clang] Extend lifetimebound analysis to detect within-initializer assignments between pointer-like objects. (PR #97473)

2024-07-02 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 c3079ffcd34e8ee2faaf7576a69a49acc1a3653f e1bd3e3d813ecce1e93957c3cbe26a8c3182abd6 --

[clang] [llvm] [PAC][Driver] Implement `-mbranch-protection=pauthabi` option (PR #97237)

2024-07-02 Thread Anton Korobeynikov via cfe-commits
asl wrote: > Is there any thought on how we want to manage signing schemas going forward? > For example I can imagine looking an environment from the triple to select a > signing schema for a particular platform. I could also see a potential for a > separate command line option to choose from

[clang] [Clang][Comments] Attach comments to decl even if preproc directives are in between (PR #88367)

2024-07-02 Thread via cfe-commits
hdoc wrote: +1 on the revert and thank you for letting me know about this. I'll make changes to limit how aggressively the frontend attaches comments to decls inline with what @gribozavr and @danakj suggested. https://github.com/llvm/llvm-project/pull/88367 ___

[clang] [Clang] Introduce 'clang-nvlink-wrapper' to work around 'nvlink' (PR #96561)

2024-07-02 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/96561 >From 2bb5bd081a29b9bf1c4e6e0f727e21a1b9258920 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 24 Jun 2024 15:14:52 -0500 Subject: [PATCH] [Clang] Introduce 'clang-nvlink-wrappaer' to work around 'nvlink'

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-02 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ commented: Thanks a lot!! Some comments are very much overdue here. https://github.com/llvm/llvm-project/pull/97407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-02 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/97407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-02 Thread Artem Dergachev via cfe-commits
@@ -326,6 +326,12 @@ class LocAsInteger : public NonLoc { static bool classof(SVal V) { return V.getKind() == LocAsIntegerKind; } }; +/// The simplest example of a concrete compound value is nonloc::CompoundVal, +/// which represents a concrete r-value of an initializer-list

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-02 Thread Artem Dergachev via cfe-commits
@@ -346,6 +352,39 @@ class CompoundVal : public NonLoc { static bool classof(SVal V) { return V.getKind() == CompoundValKind; } }; +/// The simplest example of a concrete compound value is nonloc::CompoundVal, +/// which represents a concrete r-value of an initializer-list o

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-02 Thread Artem Dergachev via cfe-commits
@@ -346,6 +352,39 @@ class CompoundVal : public NonLoc { static bool classof(SVal V) { return V.getKind() == CompoundValKind; } }; +/// The simplest example of a concrete compound value is nonloc::CompoundVal, +/// which represents a concrete r-value of an initializer-list o

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-02 Thread Artem Dergachev via cfe-commits
@@ -346,6 +352,39 @@ class CompoundVal : public NonLoc { static bool classof(SVal V) { return V.getKind() == CompoundValKind; } }; +/// The simplest example of a concrete compound value is nonloc::CompoundVal, +/// which represents a concrete r-value of an initializer-list o

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (#78034) (PR #97121)

2024-07-02 Thread via cfe-commits
https://github.com/yabinc updated https://github.com/llvm/llvm-project/pull/97121 >From d3aa71bfd9f4766e2aadc0d028d26ea7bd5e50a6 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Thu, 27 Jun 2024 17:11:52 -0700 Subject: [PATCH] [clang][CodeGen] Zero init unspecified fields in initializers in C (#

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (#97459) (PR #97121)

2024-07-02 Thread via cfe-commits
https://github.com/yabinc edited https://github.com/llvm/llvm-project/pull/97121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (#97459) (PR #97121)

2024-07-02 Thread via cfe-commits
yabinc wrote: @efriedma-quic, Thanks for the suggestion! I have created a new bug in https://github.com/llvm/llvm-project/issues/97459, and also updated commit message to clarify that this is needed by the linux kernel instead of c23 standard. https://github.com/llvm/llvm-project/pull/97121 __

[clang] [flang] [mlir] [flang] Retry add basic -mtune support (PR #96688)

2024-07-02 Thread Alexis Perry-Holby via cfe-commits
@@ -0,0 +1,9 @@ +; RUN: mlir-translate -import-llvm -split-input-file %s | FileCheck %s AlexisPerry wrote: I have been trying to reproduce my error ever since saying I had one and have been unsuccessful. It now appears that mlir-translate doesn't care about the

[clang] [Driver] Add -Wa, options --crel and --allow-experimental-crel (PR #97378)

2024-07-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/97378 >From 6e47264dc3d7395b30bedeeba7c8ca2e7b376727 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 1 Jul 2024 19:44:57 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-

[clang] [Driver] Add -Wa, options --crel and --allow-experimental-crel (PR #97378)

2024-07-02 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: not %clang -### -c --target=x86_64 -Wa,--crel %s 2>&1 | FileCheck %s --check-prefix=NOEXP + +// NOEXP: error: -Wa,--allow-experimental-crel must be specified to use -Wa,--crel. CREL is experimental and takes a non-standard section type code + +// RUN: %

[clang] [Driver] Add -Wa, options --crel and --allow-experimental-crel (PR #97378)

2024-07-02 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: not %clang -### -c --target=x86_64 -Wa,--crel %s 2>&1 | FileCheck %s --check-prefix=NOEXP + +// NOEXP: error: -Wa,--allow-experimental-crel must be specified to use -Wa,--crel. CREL is experimental and takes a non-standard section type code + +// RUN: %

[clang] [Driver] Add -Wa, options --crel and --allow-experimental-crel (PR #97378)

2024-07-02 Thread Fangrui Song via cfe-commits
@@ -801,6 +801,9 @@ def warn_drv_missing_multilib : Warning< def note_drv_available_multilibs : Note< "available multilibs are:%0">; +def err_drv_experimental_crel : Error< + "-Wa,--allow-experimental-crel must be specified to use -Wa,--crel. CREL is experimental and takes

[clang] [Clang] Allow raw string literals in C as an extension (PR #88265)

2024-07-02 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > To clarify, that means setting the `RawStringLiterals` LangOpt in > `DependencyDirectivesScanner.cpp`, right? I’m assuming yes, but I just want > to make sure. Yes, that's what I had in mind šŸ‘ https://github.com/llvm/llvm-project/pull/88265 _

[clang] clang: Relax LangOpts checks when lexing quoted numbers during preprocessing (PR #95798)

2024-07-02 Thread Jan Svoboda via cfe-commits
@@ -2068,7 +2068,8 @@ bool Lexer::LexNumericConstant(Token &Result, const char *CurPtr) { } // If we have a digit separator, continue. - if (C == '\'' && (LangOpts.CPlusPlus14 || LangOpts.C23)) { + if (C == '\'' && + (LangOpts.CPlusPlus14 || LangOpts.C23 || Parsing

[clang] 5196a91 - [HLSL] Run availability diagnostic on exported functions (#97352)

2024-07-02 Thread via cfe-commits
Author: Helena Kotas Date: 2024-07-02T15:21:11-07:00 New Revision: 5196a91b0827b895aba63ce150ebc8f10795316c URL: https://github.com/llvm/llvm-project/commit/5196a91b0827b895aba63ce150ebc8f10795316c DIFF: https://github.com/llvm/llvm-project/commit/5196a91b0827b895aba63ce150ebc8f10795316c.diff

[clang] [HLSL] Run availability diagnostic on exported functions (PR #97352)

2024-07-02 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/97352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Treat explicit specializations of static data member templates declared without 'static' as static data members when diagnosing uses of 'auto' (PR #97425)

2024-07-02 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. https://github.com/llvm/llvm-project/pull/97425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-07-02 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > > You can certainly construct cases where the different lexing rules in > > different language modes allow you to detect which language you're in from > > within the preprocessor ([1](https://eel.is/c++draft/diff.cpp11.lex) > > [2](https://eel.is/c++draft/diff.cpp14.lex#2

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-02 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/97362 >From a07ea8d187cbba5717b89f5c54138f12993b3ee8 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 6 Jun 2024 11:44:56 -0700 Subject: [PATCH 1/5] wip: Stub out adding an HLSLResource builtin type There are a

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-02 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 60d4a3517610494e5b2ef6bf347cdc71a6a979e5 6c6f17ca827feb8384441cbd6d44493954ba726f --

<    1   2   3   4   >