[clang] [clang][Driver] Fix triple config loading for clang-cl (PR #111397)

2024-12-12 Thread Bo Anderson via cfe-commits
@@ -1336,17 +1359,7 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { // FIXME: TargetTriple is used by the target-prefixed calls to as/ld // and getToolChain is const. - if (IsCLMode()) { -// clang-cl targets MSVC-style Win32. -llvm::Triple T(TargetTri

[clang] [clang][Driver] Fix triple config loading for clang-cl (PR #111397)

2024-12-12 Thread Bo Anderson via cfe-commits
@@ -1286,6 +1299,16 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { appendOneArg(Args, Opt, nullptr); } } + +// The config file may have changed the architecture so apply it. +if (HasConfigFile && Args.hasArg(options::OPT__SLASH_arm64E

[clang] [clang][Driver] Fix triple config loading for clang-cl (PR #111397)

2024-12-12 Thread Bo Anderson via cfe-commits
https://github.com/Bo98 edited https://github.com/llvm/llvm-project/pull/111397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

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

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

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

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

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

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

[clang] [clang-cl] Don't add implicit NoBuiltinAttr to deleted or defaulted functions (#116256) (PR #119719)

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

[clang] [llvm] [NVPTX] Auto-Upgrade some nvvm.annotations to attributes (PR #119261)

2024-12-12 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean edited https://github.com/llvm/llvm-project/pull/119261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Auto-Upgrade some nvvm.annotations to attributes (PR #119261)

2024-12-12 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean edited https://github.com/llvm/llvm-project/pull/119261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-12 Thread Alexander Richardson via cfe-commits
@@ -808,6 +808,10 @@ void Verifier::visitGlobalValue(const GlobalValue &GV) { "visibility must be dso_local!", &GV); + if (GV.isTagged()) { arichardson wrote: Back in 2019 or so we had very similar issues in the CHERI downstream due to k

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-12 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/117858 >From f388f19e26bdd7e45e874e4574e7d9196c2eaf0b Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 25 Nov 2024 15:52:18 + Subject: [PATCH 1/4] [clang][ASTVisitor] Visit `HoldingVar` from `Binding

[clang] [llvm] [LLVM][rtsan] Add module pass to initialize rtsan (PR #118989)

2024-12-12 Thread Chris Apple via cfe-commits
@@ -1024,12 +1024,14 @@ void EmitAssemblyHelper::RunOptimizationPipeline( FPM.addPass(BoundsCheckingPass()); }); -if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) +if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) { PB.registerScalarOp

[clang] [Clang] Add "extend lifetime" flags and release note (PR #110000)

2024-12-12 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/11 >From 6a873f5c487a936344f6cd226b7d525b406f34b2 Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Wed, 25 Sep 2024 15:08:39 +0100 Subject: [PATCH 1/7] [Clang] Add "extend lifetime" flags and release note Follow

[clang] [llvm] [LLVM][rtsan] Add module pass to initialize rtsan (PR #118989)

2024-12-12 Thread Chris Apple via cfe-commits
@@ -1024,12 +1024,14 @@ void EmitAssemblyHelper::RunOptimizationPipeline( FPM.addPass(BoundsCheckingPass()); }); -if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) +if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) { cjappl wr

[clang-tools-extra] [clang-tidy] Add C++ member function support to custom bugprone-unsafe-functions matches (PR #117165)

2024-12-12 Thread via cfe-commits
https://github.com/Discookie updated https://github.com/llvm/llvm-project/pull/117165 >From e90ab99dde0945d103959fa73ea2d31852f753e7 Mon Sep 17 00:00:00 2001 From: Viktor Date: Thu, 21 Nov 2024 14:33:24 + Subject: [PATCH 1/3] [clang-tidy] Add C++ member function support to user-defined bug

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-12-12 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/110102 >From fdfa695bc74847f5cc366bfcbf142bd5c2e3937f Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Wed, 25 Sep 2024 16:55:39 +0100 Subject: [PATCH 1/5] [Clang] Add fake use emission to Clang with -fextend-lifeti

[clang] [Clang] Fix crash for incompatible types in inline assembly (PR #119098)

2024-12-12 Thread via cfe-commits
@@ -365,3 +365,9 @@ void test19(long long x) // FIXME: This case should be supported by codegen, but it fails now. asm ("" : "=rm" (x): "0" (e)); // expected-error {{unsupported inline asm: input with type 'st_size128' (aka 'struct _st_size128') matching output with type '

[clang] [Clang] Fix crash for incompatible types in inline assembly (PR #119098)

2024-12-12 Thread via cfe-commits
https://github.com/AdUhTkJm updated https://github.com/llvm/llvm-project/pull/119098 >From 63d966fddaef45f12610274e9e606ba70039f87c Mon Sep 17 00:00:00 2001 From: AdUhTkJm <2292398...@qq.com> Date: Sun, 8 Dec 2024 08:07:59 +0800 Subject: [PATCH] [Clang] Fix crash for incompatible types in inline

[clang] [Clang] Add "extend lifetime" flags and release note (PR #110000)

2024-12-12 Thread Stephen Tozer via cfe-commits
SLTozer wrote: I've added a test for this patch that tests the driver - since we will now be relying on the driver to decide whether to pass these flags to the frontend, rather than trivially always doing so (so that [later on](https://github.com/llvm/llvm-project/pull/118026) we can use the d

[clang] [clang][Sema] Fix type of an statement expression ending with an atomic type (PR #119711)

2024-12-12 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource created https://github.com/llvm/llvm-project/pull/119711 When a statement expression's last statement is an atomic variable, GCC and Clang disagree on the type of the expression. This can be made apparent using `typeof` and forcing a diagnostic

[clang] [clang][Sema] Fix type of an statement expression ending with an atomic type (PR #119711)

2024-12-12 Thread via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: Alejandro Álvarez Ayllón (alejandro-alvarez-sonarsource) Changes When a statement expression's last statement is an atomic variable, GCC and

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-12-12 Thread Stephen Tozer via cfe-commits
SLTozer wrote: I've removed the logic that disables this flag at O0 - this has also removed the need for `-disable-O0-optnone` in any tests. Following the prior patch updating this flag to be an `=` flag represented by an enum, the latest commit changes this patch to handle that type. Finally,

[clang] 010d011 - [OpenACC] Create AST nodes for 'data' constructs

2024-12-12 Thread via cfe-commits
Author: erichkeane Date: 2024-12-12T07:28:30-08:00 New Revision: 010d0115fc8e3834fc6f747f0841f3b1e467c4da URL: https://github.com/llvm/llvm-project/commit/010d0115fc8e3834fc6f747f0841f3b1e467c4da DIFF: https://github.com/llvm/llvm-project/commit/010d0115fc8e3834fc6f747f0841f3b1e467c4da.diff LO

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2024-12-12 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/119712 This is take two of #70976. This iteration of the patch makes sure that custom diagnostics without any warning group don't get promoted by `-Werror` or `-Wfatal-errors`. This implements parts of the extension

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2024-12-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang Author: Nikolas Klauser (philnik777) Changes This is take two of #70976. This iteration of the patch makes sure that custom diagnostics without any warning group don't get promoted by `-Werror` or `-Wfatal-errors

[clang] [clang][bytecode] Handle __builtin_bcmp (PR #119678)

2024-12-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/10145 Here is the r

[libclc] [libclc] Optimize ceil/fabs/floor/rint/trunc (PR #119596)

2024-12-12 Thread Matt Arsenault via cfe-commits
arsenm wrote: > which in its header uses this strange __asm__ method of calling LLVM > intrinsics directly. That's something that's always surprised me it works. It's rather unsafe (you can bypass immarg validation for instance). Plus asm callsites get infected with overly conservative attrib

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-12 Thread Youngsuk Kim via cfe-commits
@@ -0,0 +1,11 @@ +// REQUIRES: asserts JOE1994 wrote: The test crashes with an error only with an `asserts` build. Should I just that aspect in a comment, and remove the `asserts` requirement? https://github.com/llvm/llvm-project/pull/119246

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-12 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 edited https://github.com/llvm/llvm-project/pull/119246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Optimize ceil/fabs/floor/rint/trunc (PR #119596)

2024-12-12 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > LGTM. I'm not sure how this all ends up expanding, I was expecting to see the > elementwise builtins used. Yes, I suspect that this code originates from before the builtins were available? The builtins would probably make more sense, tbh. The current method is that we hav

[clang] [Clang][Parser] Add a warning to ambiguous uses of T...[N] types (PR #116332)

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

[clang] [NFC] Updating Debug Info generation for 'this' (PR #119445)

2024-12-12 Thread Chris B via cfe-commits
llvm-beanz wrote: > any chance you could A/B test this on a bootstrap of clang, for instance? To > help validate that this really is NFC/dead code? I did a little more archeology, and I'm actually struggling to find any point in the history where this change was required. The difference betwee

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2024-12-12 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @AaronBallman Your reproducer doesn't seem to work anymore in trunk (there's probably been another change?), so I couldn't test early diagnostics anymore. If you have another reproducer I'd be happy to add it. https://github.com/llvm/llvm-project/pull/119712 _

[clang] [clang] Generate appropriate assume in presence of libc's memcpy (PR #119704)

2024-12-12 Thread via cfe-commits
serge-sans-paille wrote: what a funny timing :-) If I understand correctly, the assume should be ``dst != 0 || len ==0``, correct? https://github.com/llvm/llvm-project/pull/119704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2024-12-12 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 bf440f75b485e4ea7f809dc37df74cac140069fd 67c264e6a6de2cf39de9bb2968df461bd3b2655f --e

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2024-12-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This ends up being shockingly invasive, and I'm pretty uncomfortable about that. I realize I'm code owner of attributes here, but this touches so much of diagnostics that I don't feel comfortable being the primary reviewer, so I think we have to wait u

[clang] [HLSL] Move `_init_resource_bindings` to entry point functions (PR #119311)

2024-12-12 Thread Chris B via cfe-commits
llvm-beanz wrote: > You are correct @llvm-beanz, this change is not needed at all. Sorry for > wasting your time! Even a broken clock is right twice a day... me being the broken clock here 😄 It's never a waste to put something up to review if it helps us get to the right solution. https://gi

[clang] [clang] Enable the -Wdangling-capture diagnostic by default. (PR #119685)

2024-12-12 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/119685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-12-12 Thread Guy Blank via cfe-commits
@@ -0,0 +1,371 @@ +//===- RISCVLoadStoreOptimizer.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][Driver] Fix triple config loading for clang-cl (PR #111397)

2024-12-12 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab approved this pull request. Needs conflict resolution, but otherwise LGTM https://github.com/llvm/llvm-project/pull/111397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [Clang][Parser] Add a warning to ambiguous uses of T...[N] types (PR #116332)

2024-12-12 Thread via cfe-commits
@@ -253,6 +254,19 @@ bool Parser::ParseOptionalCXXScopeSpecifier( if (Type.isNull()) return false; +// C++ [cpp23.dcl.dcl-2]: +// Previously, T...[n] would declare a pack of function parameters. +// T...[n] is now a pack-index-specifier. [...] Valid C

[libclc] [libclc] Optimize ceil/fabs/floor/rint/trunc (PR #119596)

2024-12-12 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/119596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parser] Add a warning to ambiguous uses of T...[N] types (PR #116332)

2024-12-12 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/116332 >From 5973de1d4c368a26fd179954a13de94595f35575 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 15 Nov 2024 14:09:14 +0800 Subject: [PATCH 1/5] [Clang][Parser] Make 'T...[N]' within a function parameter a

[clang] bae383b - [Driver] Cache SanitizerArgs (NFC) (#119442)

2024-12-12 Thread via cfe-commits
Author: Aaron Puchert Date: 2024-12-12T15:38:37+01:00 New Revision: bae383ba6b53b0d8257c83f99ceecdd751d0a378 URL: https://github.com/llvm/llvm-project/commit/bae383ba6b53b0d8257c83f99ceecdd751d0a378 DIFF: https://github.com/llvm/llvm-project/commit/bae383ba6b53b0d8257c83f99ceecdd751d0a378.diff

[clang] Cache SanitizerArgs in Clang driver (NFC) (PR #119442)

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

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

2024-12-12 Thread Alexey Gerenkov via cfe-commits
@@ -2742,3 +2742,275 @@ // RISCV64-LINUX: #define __unix__ 1 // RISCV64-LINUX: #define linux 1 // RISCV64-LINUX: #define unix 1 + +// RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=xtensa < /dev/null \ +// RUN: | FileCheck -match-full-lines -check-prefix

[clang] 1d65c35 - [clang] Reject `_Complex _BitInt` (#119402)

2024-12-12 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2024-12-12T12:19:48+01:00 New Revision: 1d65c35ce16f1bc340649ac8319b34c833e23a1f URL: https://github.com/llvm/llvm-project/commit/1d65c35ce16f1bc340649ac8319b34c833e23a1f DIFF: https://github.com/llvm/llvm-project/commit/1d65c35ce16f1bc340649ac8319b34c833e23a

[clang] [clang] Reject `_Complex _BitInt` (PR #119402)

2024-12-12 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/119402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver] Support simplified triple versions for config files (PR #111387)

2024-12-12 Thread Carlo Cabrera via cfe-commits
carlocab wrote: Merging this to land the improvement. Happy to work on suggested improvements for the tests if any are still outstanding from the discussion in https://github.com/llvm/llvm-project/pull/111387#discussion_r1873784293 (since it's not clear to me which comments still apply). CC @M

[clang] 0cbdad4 - [clang][Driver] Support simplified triple versions for config files (#111387)

2024-12-12 Thread via cfe-commits
Author: Bo Anderson Date: 2024-12-12T20:04:57+08:00 New Revision: 0cbdad4bd2396b740742d9ae94cba7d7b8a32cb5 URL: https://github.com/llvm/llvm-project/commit/0cbdad4bd2396b740742d9ae94cba7d7b8a32cb5 DIFF: https://github.com/llvm/llvm-project/commit/0cbdad4bd2396b740742d9ae94cba7d7b8a32cb5.diff L

[clang] [clang][Driver] Support simplified triple versions for config files (PR #111387)

2024-12-12 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab closed https://github.com/llvm/llvm-project/pull/111387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver] Support simplified triple versions for config files (PR #111387)

2024-12-12 Thread via cfe-commits
github-actions[bot] wrote: @Bo98 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build, yo

[clang] [llvm] [InstCombine] Infer nuw for gep inbounds from base of object (PR #119225)

2024-12-12 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > huffbench.c:319:10: runtime error: left shift of negative value -93 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior huffbench.c:319:10 https://github.com/llvm/llvm-project/pull/119225 ___ cfe-commits mailing list cfe-commits@l

[clang] [docs] Add a more detailed description in CXString.h. (PR #119090)

2024-12-12 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd closed https://github.com/llvm/llvm-project/pull/119090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [docs] Add a more detailed description in CXString.h. (PR #119090)

2024-12-12 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: I'll go ahead and merge the change on your behalf as I suspect that you do not have commit rights as this is your first PR to the project. Thank you for the contribution! https://github.com/llvm/llvm-project/pull/119090 ___ cfe-commit

[clang] a8e66d7 - [docs] Add a more detailed description in CXString.h. (#119090)

2024-12-12 Thread via cfe-commits
Author: iseki Date: 2024-12-12T07:54:09-08:00 New Revision: a8e66d7f17bc648865cebf6b1e58c7a9071c6a84 URL: https://github.com/llvm/llvm-project/commit/a8e66d7f17bc648865cebf6b1e58c7a9071c6a84 DIFF: https://github.com/llvm/llvm-project/commit/a8e66d7f17bc648865cebf6b1e58c7a9071c6a84.diff LOG: [d

[clang] [docs] Add a more detailed description in CXString.h. (PR #119090)

2024-12-12 Thread via cfe-commits
github-actions[bot] wrote: @iseki0 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

[clang] [C++20][Modules] Load function body from the module that gives canonical decl (PR #111992)

2024-12-12 Thread Dmitry Polukhin via cfe-commits
dmpolukhin wrote: FYI, I tested the latest version on our reproducers and it fixed all known issues due to friend inline functions. https://github.com/llvm/llvm-project/pull/111992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [docs] Add a more detailed description in CXString.h. (PR #119090)

2024-12-12 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/119090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-12 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: > May it be possible that the wrapper function's return type is invalid and the > cast isn't needed? LLVM-IR (from llvm without assertions, before this revision) shows that the wrapper function returns `ptr` while `MyGlobVar` has `addrspace(1)`. ```llvm $thread-local wrapper ro

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

2024-12-12 Thread Nikita Popov via cfe-commits
nikic wrote: It looks like this somehow negatively affects stage2 clang performance: https://llvm-compile-time-tracker.com/compare.php?from=00e1cc4c9d002c78cf890b630343b052ebca0399&to=624cc7048f604ed1087f63fdbe4cbf40f1d35b69&stat=instructions:u https://github.com/llvm/llvm-project/pull/119523 _

[clang] [docs] Add a more detailed description in CXString.h. (PR #119090)

2024-12-12 Thread via cfe-commits
iseki0 wrote: > I'll go ahead and merge the change on your behalf as I suspect that you do > not have commit rights as this is your first PR to the project. Thank you for > the contribution! Thank you https://github.com/llvm/llvm-project/pull/119090 ___

[libclc] [libclc] Optimize ceil/fabs/floor/rint/trunc (PR #119596)

2024-12-12 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > > which in its header uses this strange **asm** method of calling LLVM > > intrinsics directly. > > That's something that's always surprised me it works. It's rather unsafe (you > can bypass immarg validation for instance). Plus asm callsites get infected > with overly co

[clang] [clang][Driver] Fix triple config loading for clang-cl (PR #111397)

2024-12-12 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > I didn't even realize people are using config files with clang-cl (since IIRC > it doesn't support the config file command-line options). You don't need to use config files with `clang-cl` to need this patch -- you need it if you use triple-based config files and also use `cl

[clang] [flang] [flang][Driver] Don't require -fno-integrated-as when using -save-temps (PR #119624)

2024-12-12 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: @banach-space, @skatrak Thank you for reviewing this. I will look into developing `fc1as`. https://github.com/llvm/llvm-project/pull/119624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [compiler-rt] Move interceptors for libresolv functions to MSan (PR #119071)

2024-12-12 Thread Aaron Puchert via cfe-commits
@@ -1410,7 +1410,7 @@ void tools::linkSanitizerRuntimeDeps(const ToolChain &TC, // libresolv.a, even if exists, is an empty archive to satisfy POSIX -lresolv // requirement. if (TC.getTriple().isOSLinux() && !TC.getTriple().isAndroid() && - !TC.getTriple().isMusl())

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-12 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/117858 >From f388f19e26bdd7e45e874e4574e7d9196c2eaf0b Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 25 Nov 2024 15:52:18 + Subject: [PATCH] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-12 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/117858 >From f388f19e26bdd7e45e874e4574e7d9196c2eaf0b Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 25 Nov 2024 15:52:18 + Subject: [PATCH 1/2] [clang][ASTVisitor] Visit `HoldingVar` from `Binding

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

2024-12-12 Thread Michael Buch via cfe-commits
@@ -8544,7 +8524,8 @@ clang::EnumConstantDecl *TypeSystemClang::AddEnumerationValueToEnumerationType( bool is_signed = false; underlying_type.IsIntegerType(is_signed); - llvm::APSInt value(enum_value_bit_size, is_signed); + // APSInt constructor's sign argument is isUns

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

2024-12-12 Thread Michael Buch via cfe-commits
@@ -2299,11 +2301,103 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_va

[clang] [flang] [flang][Driver] Don't require -fno-integrated-as when using -save-temps (PR #119624)

2024-12-12 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: @DavidTruby The build kite shows a failure on Windows on `Driver/pp-fixed-form.f90` with the error `flang: error: there is no external assembler that can be used on this platform` This patch forces an external assembler to be used when `-save-temps`. Is this not possible

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-12 Thread Clement Courbet via cfe-commits
@@ -143,6 +143,15 @@ const Formula &getFormula(const ValueDecl &D, const Environment &Env) { return cast(Env.getValue(D))->formula(); } +const BindingDecl *findBindingDecl(const char *Name, ASTContext &ASTCtx) { legrosbuffle wrote: Not quite sure why I did

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-12 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/117858 >From f388f19e26bdd7e45e874e4574e7d9196c2eaf0b Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 25 Nov 2024 15:52:18 + Subject: [PATCH 1/2] [clang][ASTVisitor] Visit `HoldingVar` from `Binding

[clang] Fix lld link issue for OHOS (PR #118192)

2024-12-12 Thread Pavel Kosov via cfe-commits
https://github.com/kpdev closed https://github.com/llvm/llvm-project/pull/118192 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bc28be0 - [Driver][OHOS] Fix lld link issue for OHOS (#118192)

2024-12-12 Thread via cfe-commits
Author: Peng Huang Date: 2024-12-12T17:52:49+03:00 New Revision: bc28be0a428020ea803c94adb4df48ee4972e9f1 URL: https://github.com/llvm/llvm-project/commit/bc28be0a428020ea803c94adb4df48ee4972e9f1 DIFF: https://github.com/llvm/llvm-project/commit/bc28be0a428020ea803c94adb4df48ee4972e9f1.diff LO

[clang] Fix lld link issue for OHOS (PR #118192)

2024-12-12 Thread via cfe-commits
github-actions[bot] wrote: @phuang Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

[clang] [clang] Generate appropriate assume in presence of libc's memcpy (PR #119704)

2024-12-12 Thread Nikita Popov via cfe-commits
https://github.com/nikic requested changes to this pull request. This is no longer the case after [N3322](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3322.pdf). (Incidentally, I wrote a blog post about this yesterday: https://developers.redhat.com/articles/2024/12/11/making-memcpynull-nu

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-12 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 67eb05b2928ea707761bb040e6eb824f4ca9ef3a bc26437343450a00c24aff45650bb67c7fc98ea5 --e

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

2024-12-12 Thread Michael Buch via cfe-commits
@@ -8544,7 +8524,8 @@ clang::EnumConstantDecl *TypeSystemClang::AddEnumerationValueToEnumerationType( bool is_signed = false; underlying_type.IsIntegerType(is_signed); - llvm::APSInt value(enum_value_bit_size, is_signed); + // APSInt constructor's sign argument is isUns

[clang] 6cfad63 - [OpenACC] Implement 'if' clause sema for 'data' constructs

2024-12-12 Thread via cfe-commits
Author: erichkeane Date: 2024-12-12T09:59:09-08:00 New Revision: 6cfad635d5aaa01abb82edc386329d8ed25078e1 URL: https://github.com/llvm/llvm-project/commit/6cfad635d5aaa01abb82edc386329d8ed25078e1 DIFF: https://github.com/llvm/llvm-project/commit/6cfad635d5aaa01abb82edc386329d8ed25078e1.diff LO

[clang-tools-extra] Copy to move (PR #119741)

2024-12-12 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 bc28be0a428020ea803c94adb4df48ee4972e9f1 fadfd03b9596e6751c6bda5f17d076f1884fbe29 --e

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-12-12 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/116331 >From ae719102cdafe101b3d718a144ed2f3488ecd44f Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Fri, 25 Oct 2024 17:48:41 + Subject: [PATCH 01/14] adding comments --- clang/include/clang/Basic/Attr.td

[clang] [llvm] [clang][modules] Separate parsing of modulemaps (PR #119740)

2024-12-12 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 4b825c7417f72ee88ee3e4316d0c01ed463f1241 12f19b16945b66e75a32cade1f7cb7aac8424b12 --e

[clang] [clang] Fix the post-filtering heuristic for GSLPointer. (PR #114044)

2024-12-12 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/114044 >From 15b7806b933b0964d004c9d13565bc834c59fb01 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 1 Nov 2024 16:51:03 +0100 Subject: [PATCH 1/6] [clang] Fix the post-filtering heuristics for GSLPointer case.

[clang] [clang] Fix the post-filtering heuristic for GSLPointer. (PR #114044)

2024-12-12 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/114044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix lld link issue for OHOS (PR #118192)

2024-12-12 Thread Pavel Kosov via cfe-commits
kpdev wrote: Agree. Tests would be useful here. Thanks for mentioning it https://github.com/llvm/llvm-project/pull/118192 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Handle __builtin_bcmp (PR #119678)

2024-12-12 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: Check out https://lab.llvm.org/buildbot/#/builders/13/builds/4041: ``` RUN: at line 1: /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/clang -cc1 -internal-isystem /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/lib/clan

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-12 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/119670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][modules] Separate parsing of modulemaps (PR #119740)

2024-12-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Spencer (Bigcheese) Changes This separates out parsing of modulemaps from updating the `clang::ModuleMap` information. Currently this has no effect other than slightly changing diagnostics. Upcoming changes will use this to allow

[clang] [llvm] [clang][modules] Separate parsing of modulemaps (PR #119740)

2024-12-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-adt Author: Michael Spencer (Bigcheese) Changes This separates out parsing of modulemaps from updating the `clang::ModuleMap` information. Currently this has no effect other than slightly changing diagnostics. Upcoming changes will use this to al

[clang] [NFC] Updating Debug Info generation for 'this' (PR #119445)

2024-12-12 Thread Michael Buch via cfe-commits
Michael137 wrote: Don't see a problem with this but could we elaborate on the motivation for this? Looks like this is required for https://github.com/llvm/llvm-project/pull/119041? Why is that? The original change this is based on is: https://github.com/microsoft/DirectXShaderCompiler/pull/62

[clang-tools-extra] Copy to move (PR #119741)

2024-12-12 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam created https://github.com/llvm/llvm-project/pull/119741 None >From 440554df79ebc7c8971c4af928f623b13c95c6ee Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Wed, 4 Dec 2024 12:54:41 -0800 Subject: [PATCH 1/2] [NFC] Use a move instead of a copy to optimize

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-12 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan commented: The idea looks good. Need to add test. You should add `CLANG_USE_XCSELECT` as a requirement and label all the tests properly (including those will break). Maybe you can also remove the hack for `CLANG_NO_XCSELECT` but I am neutral on that. https:

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-12 Thread Steven Wu via cfe-commits
@@ -2257,17 +2261,26 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const { // Warn if the path does not exist. if (!getVFS().exists(A->getValue())) getDriver().Diag(clang::diag::warn_missing_sysroot) << A->getValue(); - } else { -if (char *env =

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-12 Thread Steven Wu via cfe-commits
@@ -214,6 +214,39 @@ if(GCC_INSTALL_PREFIX AND NOT USE_DEPRECATED_GCC_INSTALL_PREFIX) "See https://github.com/llvm/llvm-project/pull/77537 for detail.") endif() +if(APPLE) + check_include_file(xcselect.h CLANG_HAVE_XCSELECT_H) cachemeifyoucan wrote: All

[clang] [NFC] Updating Debug Info generation for 'this' (PR #119445)

2024-12-12 Thread via cfe-commits
joaosaffran wrote: FYI: been working on the bootstrap build as well, those have been a bit slow on my setup https://github.com/llvm/llvm-project/pull/119445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang-tools-extra] Copy to move (PR #119741)

2024-12-12 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/119741 >From 440554df79ebc7c8971c4af928f623b13c95c6ee Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Wed, 4 Dec 2024 12:54:41 -0800 Subject: [PATCH 1/3] [NFC] Use a move instead of a copy to optimize perfor

[clang] [llvm] True16 for v_alignbyte_b32 in MC (PR #119750)

2024-12-12 Thread Brox Chen via cfe-commits
https://github.com/broxigarchen created https://github.com/llvm/llvm-project/pull/119750 None >From 63323d742b5eadc2849086ce991aa4c609336ea7 Mon Sep 17 00:00:00 2001 From: guochen2 Date: Thu, 12 Dec 2024 13:33:14 -0500 Subject: [PATCH] True16 for v_alignbyte_b32 in MC --- clang/lib/CodeGen/C

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-12-12 Thread Sarah Spall via cfe-commits
@@ -3166,109 +3171,228 @@ bool SPIRVInstructionSelector::selectFirstBitHigh32(Register ResVReg, .constrainAllUses(TII, TRI, RBI); } -bool SPIRVInstructionSelector::selectFirstBitHigh64(Register ResVReg, -const SPIRVTyp

<    1   2   3   4   >