[clang] [Clang][AArch64] Add pessimistic vscale_range when sve is in target-f… (PR #137624)

2025-04-30 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Those tests are already generating that warning; I assume the "new" warning is a duplicate? That seems like a bug in the x86 handling for target features: it should generate a warning at most once per function, and the warning should point to the function in question. (C

[clang] [HLSL] Make lerp overload tests stricter. NFC (PR #137898)

2025-04-30 Thread Justin Bogner via cfe-commits
@@ -1,108 +1,160 @@ -// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \ -// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \ -// RUN: -o - | FileCheck %s --check-prefixes=CHECK \ -// RUN: -DFNATTRS="noundef nofpclass(nan inf)"

[clang] [HLSL] Make lerp overload tests stricter. NFC (PR #137898)

2025-04-30 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/137898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Make lerp overload tests stricter. NFC (PR #137898)

2025-04-30 Thread Farzon Lotfi via cfe-commits
farzonl wrote: I have a strong suspicion all the `*-overload.hlsl` tests have the same mistake and are also incorrect and need to updated. Can you file a ticket for investigating\cleaning up the other overload tests. Not work you have to do, but we should at least track that it needs ot be d

[clang] [HLSL] Make lerp overload tests stricter. NFC (PR #137898)

2025-04-30 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/137898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate user-defined conversion function call (PR #137914)

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

[clang] [HLSL] Make lerp overload tests stricter. NFC (PR #137898)

2025-04-30 Thread Justin Bogner via cfe-commits
bogner wrote: > I have a strong suspicion all the `*-overload.hlsl` tests have the same > mistake and are also incorrect and need to updated. Can you file a ticket for > investigating\cleaning up the other overload tests. Not work you have to do, > but we should at least track that it needs ot

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: I won't have time to review this closely until next week. I think the 'inside profile' is a red herring here, this looks more like a problem from calling it from within deserialization. We could try getting to the bottom of it and see if we can assert in

[clang] d851490 - [HLSL] Make lerp overload tests stricter. NFC (#137898)

2025-04-30 Thread via cfe-commits
Author: Justin Bogner Date: 2025-04-30T12:26:52-07:00 New Revision: d851490c290832507d5fd87227e995d233b9f5b2 URL: https://github.com/llvm/llvm-project/commit/d851490c290832507d5fd87227e995d233b9f5b2 DIFF: https://github.com/llvm/llvm-project/commit/d851490c290832507d5fd87227e995d233b9f5b2.diff

[clang] [HLSL] Make lerp overload tests stricter. NFC (PR #137898)

2025-04-30 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/137898 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-se

[clang] [HLSL] Make lerp overload tests stricter. NFC (PR #137898)

2025-04-30 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/137898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Add -Wjump-bypasses-init (PR #138009)

2025-04-30 Thread Eli Friedman via cfe-commits
@@ -560,13 +560,14 @@ LABEL3:{} // #GOTOLBL3 void IndirectGoto3_Loop() { void* ptr; #pragma acc parallel loop// #GOTOPAR_LOOP3 - for (unsigned i = 0; i < 5; ++i) { + for (unsigned i = 0; i < 5; ++i) { // #INIT LABEL3:{} // #GOTOLBL3_2 ptr = &&LABEL3; } -// expected

[libclc] [libclc] Move minmag & maxmag to the CLC library (PR #137982)

2025-04-30 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. just a move but the implementation could be better https://github.com/llvm/llvm-project/pull/137982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [clang] Fix UEFI Target info (PR #127290)

2025-04-30 Thread Prabhu Rajasekaran via cfe-commits
https://github.com/Prabhuk closed https://github.com/llvm/llvm-project/pull/127290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj created https://github.com/llvm/llvm-project/pull/137996 `f-instrument-functions` helps in profiling functions. This PR adds support for the option by defining values for function attributes `instrument_function_entry` and `instrument_function_exit`. LLVM Backend a

[clang] [HLSL][SPIRV] Add CLI option `-fspv-extension` (PR #137985)

2025-04-30 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/137985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove FEM_Indeterminable (PR #137661)

2025-04-30 Thread Oliver Hunt via cfe-commits
ojhunt wrote: @zahiraam none of these actually try to set FEM_Indeterminate, so far I cannot find any way to make clang ever set that state and I can’t find a way for source code to do so either - it looks like in the past the fpcontrol pragma could induce it, but none of the examples still do

[libclc] [libclc] Move minmag & maxmag to the CLC library (PR #137982)

2025-04-30 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,18 @@ +//===--===// +// +// 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: Apac

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-04-30 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Code autocomplete works just fine with CodePatterns::None but include > autocomplete does not work anymore. Gonna investigate when i have some time. I guess the preprocessor completions are all `RK_Pattern` (added [here](https://searchfox.org/llvm/rev/2f976956e5ccef5664

[clang] 0bd992a - [clang AST] move mangling API to namespace clang to allow calls from swift-frontend (#137884)

2025-04-30 Thread via cfe-commits
Author: Peter Rong Date: 2025-04-30T09:37:55-07:00 New Revision: 0bd992a8d7193e15191f14a4bd39fd4dd181dbdb URL: https://github.com/llvm/llvm-project/commit/0bd992a8d7193e15191f14a4bd39fd4dd181dbdb DIFF: https://github.com/llvm/llvm-project/commit/0bd992a8d7193e15191f14a4bd39fd4dd181dbdb.diff LO

[clang] [clang AST] move mangling API to namespace clang to allow calls from swift-frontend (PR #137884)

2025-04-30 Thread Daniel Rodríguez Troitiño via cfe-commits
https://github.com/drodriguez closed https://github.com/llvm/llvm-project/pull/137884 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8e4dd21 - [HLSL][RootSignature] Add lexing support for floating points (#137720)

2025-04-30 Thread via cfe-commits
Author: Finn Plummer Date: 2025-04-30T09:41:08-07:00 New Revision: 8e4dd21e6362ca161b7fda4fe7c5fa20f72ffab2 URL: https://github.com/llvm/llvm-project/commit/8e4dd21e6362ca161b7fda4fe7c5fa20f72ffab2 DIFF: https://github.com/llvm/llvm-project/commit/8e4dd21e6362ca161b7fda4fe7c5fa20f72ffab2.diff

[clang] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-04-30 Thread via cfe-commits
@@ -0,0 +1,84 @@ +//===-- llvm/Target/TargetVerifier.h - LLVM IR Target Verifier ---*- C++ -*-===// jofrn wrote: It is to just have a common interface to derive from, but we will not instantiate the base class as per the current method. https://github.com/llvm

[clang] [llvm] [HLSL] Run finalize linkage pass for all targets (PR #134260)

2025-04-30 Thread Steven Perron via cfe-commits
https://github.com/s-perron reopened https://github.com/llvm/llvm-project/pull/134260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-30 Thread John McCall via cfe-commits
rjmccall wrote: > > Similarly, ObjC selector components exist outside of the normal keyword > > rules, and the warning should never kick in on them. > > I don't know about selectors all that much; can you give me a test case that > you think I should handle? In general: look at `ParseObjCSele

[clang] [clang][Dependency Scanning] Report What a Module Exports during Scanning (PR #137421)

2025-04-30 Thread Cyndy Ishida via cfe-commits
@@ -115,6 +115,15 @@ struct ModuleID { } }; +struct ExtendedModuleID { cyndyishida wrote: For case 1. i'd argue that `for (const auto &Info : ClangModuleDeps)` is less readable than `for (const auto &[ID, isExported] : ClangModuleDeps)` For case 3, that

[clang] [C] Add -Wduplicate-decl-specifier to -Wc++-compat (PR #138012)

2025-04-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/138012 The existing diagnostic, already enabled by default in C, will diagnose use of duplicate declaration specifiers (e.g., `const const`). However, the C++ standard claims that is ill-formed, so the diagnostic

[clang] [C] Add -Wduplicate-decl-specifier to -Wc++-compat (PR #138012)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes The existing diagnostic, already enabled by default in C, will diagnose use of duplicate declaration specifiers (e.g., `const const`). However, the C++ standard claims that is ill-formed, so the diagno

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Tarun Prabhu via cfe-commits
@@ -310,6 +310,10 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts, args.filtered(clang::driver::options::OPT_fembed_offload_object_EQ)) opts.OffloadObjects.push_back(a->getValue()); + if (args.hasFlag(clang::driver::options::OPT_finstrument

[clang] [clang][Dependency Scanning] Report What a Module Exports during Scanning (PR #137421)

2025-04-30 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. https://github.com/llvm/llvm-project/pull/137421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Add -Wjump-bypasses-init (PR #138009)

2025-04-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/138009 >From e626293edbba69d0627181b9118aff795bd4173b Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 30 Apr 2025 14:20:03 -0400 Subject: [PATCH 1/2] [C] Add -Wjump-bypasses-init We already diagnose when

[clang] [C] Add -Wjump-bypasses-init (PR #138009)

2025-04-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Frightening how few tests this breaks, but LGTM. We don't enable `-Wc++-compat` for many of our tests, so the fallout isn't terrible; just impacts the tests where jump diagnostics were already enabled for C (which isn't often). https://github.com/llvm/llvm-project/pull/1

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > Similarly, ObjC selector components exist outside of the normal keyword > > > rules, and the warning should never kick in on them. > > > > > > I don't know about selectors all that much; can you give me a test case > > that you think I should handle? > > In general:

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-30 Thread John McCall via cfe-commits
rjmccall wrote: Yeah, triggering this at the preprocessor level is not going to let you do in properly in Objective-C, where keywords are effectively context-sensitive. If that's the only reasonable way to implement it, you should just turn it off in Objective-C completely. https://github.com

[clang] [C] Add -Wduplicate-decl-specifier to -Wc++-compat (PR #138012)

2025-04-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/138012 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][counted_by] Add support for 'counted_by' on struct pointers (PR #137250)

2025-04-30 Thread Kees Cook via cfe-commits
kees wrote: This is looking good, but needs to support `void *` struct members (they are treated as byte-sized for pointer arithmetic and `memcpy`). GCC has added support for this. Otherwise, yes, this is building for Linux with some (non-`void *`) annotations added and is operating correctly.

[clang] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-04-30 Thread via cfe-commits
@@ -0,0 +1,144 @@ +//===-- TargetVerifier.cpp - LLVM IR Target Verifier *- C++ -*-===// + +/ 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

[clang] [clang-tools-extra] [lldb] [clang][frontend] Require invocation to construct `CompilerInstance` (PR #137668)

2025-04-30 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. Makes sense. Every non-test creation of `CompilerInstance` has an associated invocation. https://github.com/llvm/llvm-project/pull/137668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 228b330 - Support pack expansion for Clang Thread Safety attributes (#137477)

2025-04-30 Thread via cfe-commits
Author: Aaron Puchert Date: 2025-04-30T22:21:06+02:00 New Revision: 228b3309880bbd5a237257df5d67a0f7f4b5a01f URL: https://github.com/llvm/llvm-project/commit/228b3309880bbd5a237257df5d67a0f7f4b5a01f DIFF: https://github.com/llvm/llvm-project/commit/228b3309880bbd5a237257df5d67a0f7f4b5a01f.diff

[clang] [clang] Shard out some small gtest binaries (PR #138021)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Reid Kleckner (rnk) Changes @nico mentioned that FormatTests and BasicTests are small binaries with few dependencies, so keeping them separate is nice. I broke them out as distinct test binaries, and they are still pretty small: $ f

[clang] Support pack expansion for Clang Thread Safety attributes (PR #137477)

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

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2025-04-30 Thread Gedare Bloom via cfe-commits
https://github.com/gedare updated https://github.com/llvm/llvm-project/pull/108332 >From 8846ff045f969b258554c3cfb72161e9f61dda19 Mon Sep 17 00:00:00 2001 From: Gedare Bloom Date: Thu, 20 Jun 2024 17:35:39 -0600 Subject: [PATCH 1/3] Format: add AlignAfterControlStatement Introduce new style op

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-04-30 Thread Reid Kleckner via cfe-commits
rnk wrote: > `BasicTests` and `FormatTests` had fairly few deps (they didn't need Sema > etc) and compiled much fewer files than they presumably now do. Does it make > sense to keep those as distinct binaries? FormatTests has many clang dependencies, but after rebuilding, it looks like it's s

[clang] [llvm] [mlir] [AMDGPU] Add a new amdgcn.load.to.lds intrinsic (PR #137425)

2025-04-30 Thread Krzysztof Drewniak via cfe-commits
@@ -444,17 +444,40 @@ def ROCDL_ds_read_tr6_b96 : ROCDL_LDS_Read_Tr_IntrOp<"ds.read.tr6.b96">; def ROCDL_ds_read_tr16_b64 : ROCDL_LDS_Read_Tr_IntrOp<"ds.read.tr16.b64">; //===-===// -// Global load to LDS int

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2025-04-30 Thread Gedare Bloom via cfe-commits
@@ -5283,6 +5299,7 @@ struct FormatStyle { bool operator==(const FormatStyle &R) const { return AccessModifierOffset == R.AccessModifierOffset && AlignAfterOpenBracket == R.AlignAfterOpenBracket && + AlignAfterControlStatement == R.AlignAfterControlSt

[clang] [clang] Shard out some small gtest binaries (PR #138021)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Reid Kleckner (rnk) Changes @nico mentioned that FormatTests and BasicTests are small binaries with few dependencies, so keeping them separate is nice. I broke them out as distinct test binaries, and they are still pretty small: $ find too

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2025-04-30 Thread Gedare Bloom via cfe-commits
gedare wrote: When I updated, my build target for `FormatTests` stopped working. ``` ninja -C build clang-format FormatTests ninja: Entering directory `build' ninja: error: unknown target 'FormatTests' ``` I'm trying to figure out what changed or how to modify my workflow. I think I ran this PR

[clang] [clang-refactor] Add Matcher Edit refactoring rule (PR #123782)

2025-04-30 Thread Roscoe A. Bartlett via cfe-commits
=?utf-8?b?0JjQs9C90LDRgiDQodC10YDQsw=?=, =?utf-8?b?0JjQs9C90LDRgiDQodC10YDQsw=?Message-ID: In-Reply-To: bartlettroscoe wrote: Hello @IgnatSergeev, thanks for your response! I am looping in my colleague @achauphan who has been working with the LLVM Clang refactoring tooling ... > But to be ho

[clang] [clang][NFC] Format two files with CallingConv switches (PR #138000)

2025-04-30 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review https://github.com/llvm/llvm-project/pull/138000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 92b03e4 - [clang][NFC] Format two files with CallingConv switches (#138000)

2025-04-30 Thread via cfe-commits
Author: Nick Sarnie Date: 2025-04-30T20:52:07Z New Revision: 92b03e4f04405bfe55d707ed17a8b6ca89513018 URL: https://github.com/llvm/llvm-project/commit/92b03e4f04405bfe55d707ed17a8b6ca89513018 DIFF: https://github.com/llvm/llvm-project/commit/92b03e4f04405bfe55d707ed17a8b6ca89513018.diff LOG: [

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/137996 >From bb486c5e7cbe7b1c4a87469e06ca51bf49ddd081 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 29 Apr 2025 14:41:55 -0500 Subject: [PATCH 1/2] [flang] Support flag -finstrument-functions --- clang/

[clang] [clang][Dependency Scanning] Report What a Module Exports during Scanning (PR #137421)

2025-04-30 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/137421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Implement JSON formatted -ftime-report (PR #137737)

2025-04-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ml-opt-dev-x86-64` running on `ml-opt-dev-x86-64-b2` while building `clang,llvm` at step 4 "cmake-configure". Full details are available at: https://lab.llvm.org/buildbot/#/builders/137/builds/17770 Here is the relevant pie

[clang] [llvm] [clang] Add spir_kernel attribute (PR #137882)

2025-04-30 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/137882 >From be91732b261f7a4874a9b1789fbf9bff6359cd58 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 30 Apr 2025 13:59:46 -0700 Subject: [PATCH] [clang] Add spir_kernel attribute Signed-off-by: Sarnie, Nick

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/137996 >From bb486c5e7cbe7b1c4a87469e06ca51bf49ddd081 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 29 Apr 2025 14:41:55 -0500 Subject: [PATCH 1/3] [flang] Support flag -finstrument-functions --- clang/

[clang] [CIR] Upstream pointer arithmetic support (PR #138041)

2025-04-30 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/138041 This adds support for explicit pointer arithmetic, including unary increment and decrement of pointer values. >From ae1fd50a03a0e5f7c0c40463dc6a07f981f79f66 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date:

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Other than the nit about the documentation text, LGTM. Thanks for the changes. https://github.com/llvm/llvm-project/pull/137996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] df6d1cf - [CIR] Upstream support for l-value references (#138001)

2025-04-30 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-04-30T14:51:45-07:00 New Revision: df6d1cf4c2e9660967a53498a991ef9c1915c61e URL: https://github.com/llvm/llvm-project/commit/df6d1cf4c2e9660967a53498a991ef9c1915c61e DIFF: https://github.com/llvm/llvm-project/commit/df6d1cf4c2e9660967a53498a991ef9c1915c61e.diff L

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/137996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Fix some clang-format mistakes (PR #138036)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Nick Sarnie (sarnex) Changes Fixes for https://github.com/llvm/llvm-project/pull/138000 --- Full diff: https://github.com/llvm/llvm-project/pull/138036.diff 1 Files Affected: - (modified) clang/lib/CodeGen/CGCall.cpp (+2-3) `

[clang] [CIR] Upstream support for l-value references (PR #138001)

2025-04-30 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/138001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Tarun Prabhu via cfe-commits
@@ -81,6 +81,9 @@ class CodeGenOptions : public CodeGenOptionsBase { /// Options to add to the linker for the object file std::vector DependentLibs; + /// Indicates whether -finstrument-functions option is passed tarunprabhu wrote: nit ```suggestion /

[clang] [CIR] Upstream pointer arithmetic support (PR #138041)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This adds support for explicit pointer arithmetic, including unary increment and decrement of pointer values. --- Full diff: https://github.com/llvm/llvm-project/pull/138041.diff 3 Files Affected: - (

[clang] [OpenACC][CIR] Start work to lower 'loop' (PR #137972)

2025-04-30 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: > In the future, we'll have to teach the OpenACC dialect how to derive the > upperbound, lowerbound, and step from the cir.for loop Yea, even better if the `cir.for` representation can itself be improved to expose that information (either by transforming it into a more ref

[clang] [WebKit checkers] Treat std::bit_cast as a pointer conversion (PR #137476)

2025-04-30 Thread Rashmi Mudduluru via cfe-commits
@@ -462,7 +462,7 @@ bool isPtrConversion(const FunctionDecl *F) { const auto FunctionName = safeGetName(F); if (FunctionName == "getPtr" || FunctionName == "WeakPtr" || FunctionName == "dynamicDowncast" || FunctionName == "downcast" || - FunctionName == "checkedD

[clang] [llvm] [mlir] [IR] Do not store Function inside BlockAddress (PR #137958)

2025-04-30 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I think at some point we were discussing changing what happens when you have a dead blockaddress, which might involve a kind of blockaddress that doesn't refer to a specific basic block. (The value of "1" has bad interactions if you compute the difference between two bloc

[clang] [RawPtrRefMemberChecker] Add the support for union and pointers to unsafe pointers. (PR #138042)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes This PR adds support for detecting unsafe union members and pointers to unsafe pointers (e.g. T** where T* is an unsafe pointer type). --- Full diff: https://github.com/llvm/llvm-project/pull

[clang] [RawPtrRefMemberChecker] Add the support for union and pointers to unsafe pointers. (PR #138042)

2025-04-30 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/138042 This PR adds support for detecting unsafe union members and pointers to unsafe pointers (e.g. T** where T* is an unsafe pointer type). Rate limit · GitHub body { ba

[libunwind] [libunwind] [SEH] Implement parsing of aarch64 pdata/xdata (PR #137949)

2025-04-30 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The parsing itself looks fine. I don't have any context for how this code is supposed to work, though. https://github.com/llvm/llvm-project/pull/137949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [WebKit checkers] Treat std::bit_cast as a pointer conversion (PR #137476)

2025-04-30 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud edited https://github.com/llvm/llvm-project/pull/137476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebKit checkers] Treat std::bit_cast as a pointer conversion (PR #137476)

2025-04-30 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud commented: LGTM! https://github.com/llvm/llvm-project/pull/137476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support ptr to ptr and union in webkit member checker (PR #137566)

2025-04-30 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/137566 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support ptr to ptr and union in webkit member checker (PR #137566)

2025-04-30 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Closing this in favor of https://github.com/llvm/llvm-project/pull/138042. https://github.com/llvm/llvm-project/pull/137566 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Bypass TAD during overload resolution if a perfect match exists (PR #136203)

2025-04-30 Thread Alexander Kornienko via cfe-commits
alexfh wrote: This change breaks a bunch of other cases, for example, calls to `NodeDefBuilder::Attr("...", {some_value})` https://android.googlesource.com/platform/external/tensorflow/+/main/tensorflow/core/framework/node_def_builder.h#130 https://github.com/llvm/llvm-project/pull/136203

[clang-tools-extra] [clang-tidy] Return error code on config parse error (PR #136167)

2025-04-30 Thread Galen Elias via cfe-commits
@@ -337,8 +337,7 @@ Allow empty enabled checks. This suppresses the "no checks enabled" error when disabling all of the checks. )"), - cl::init(false), - cl::cat(ClangTidyCategory)); +

[clang] [WebKit checkers] Treat std::bit_cast as a pointer conversion (PR #137476)

2025-04-30 Thread Ryosuke Niwa via cfe-commits
@@ -462,7 +462,7 @@ bool isPtrConversion(const FunctionDecl *F) { const auto FunctionName = safeGetName(F); if (FunctionName == "getPtr" || FunctionName == "WeakPtr" || FunctionName == "dynamicDowncast" || FunctionName == "downcast" || - FunctionName == "checkedD

[clang] [WebKit checkers] Treat std::bit_cast as a pointer conversion (PR #137476)

2025-04-30 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/137476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebKit checkers] Treat std::bit_cast as a pointer conversion (PR #137476)

2025-04-30 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/137476 >From c76e86105b5ba03cc2a3c8399670b2b38eb8e6ea Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 26 Apr 2025 14:03:13 -0700 Subject: [PATCH 1/2] [WebKit checkers] Treat std::bit_cast as a pointer conversion

[clang] [CIR] Upstream initial support for union type (PR #137501)

2025-04-30 Thread Iris Shi via cfe-commits
https://github.com/el-ev closed https://github.com/llvm/llvm-project/pull/137501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-04-30 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/137690 >From 0ab73ae597164aa039be69534056edbe26e55243 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Mon, 28 Apr 2025 18:42:10 + Subject: [PATCH 01/11] [HLSL][RootSignature] Define and integrate rootsig clang a

[clang] [clang] Remove FEM_Indeterminable (PR #137661)

2025-04-30 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Yeah, clang-15 seems to be the only time we would ever produce -1: https://godbolt.org/z/7M61eff4f https://github.com/llvm/llvm-project/pull/137661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Anchu Rajendran S via cfe-commits
@@ -310,6 +310,10 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts, args.filtered(clang::driver::options::OPT_fembed_offload_object_EQ)) opts.OffloadObjects.push_back(a->getValue()); + if (args.hasFlag(clang::driver::options::OPT_finstrument

[clang] [libcxx] Reland: [clang] unified CWG2398 and P0522 changes; finishes implementation of P3310 (PR #124137)

2025-04-30 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: Hi @mizvekov I believe this change is impacting our downstream compiler. Here is a minimal example: ``` #include #include namespace { template class ForEach; // intentionally undefined

[clang] [Clang][NFC] assert IFaceT in SemaObjC::HandleExprPropertyRefExpr (PR #138026)

2025-04-30 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/138026 Static analysis flagged that we use IFaceT in HandleExprPropertyRefExpr without checking even though getInterfaceType() can return nullptr. The comments make it clear the assumption is that we will always have a

[clang] [Clang][NFC] assert IFaceT in SemaObjC::HandleExprPropertyRefExpr (PR #138026)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) Changes Static analysis flagged that we use IFaceT in HandleExprPropertyRefExpr without checking even though getInterfaceType() can return nullptr. The comments make it clear the assumption is that we will always

[clang] [Clang] Bypass TAD during overload resolution if a perfect match exists (PR #136203)

2025-04-30 Thread Alexander Kornienko via cfe-commits
alexfh wrote: This commit changed the behavior of the following code (https://godbolt.org/z/r1q55e1jv / https://godbolt.org/z/GsPqxaf3G): ``` #include constexpr unsigned long num = 123; void foo() { // OK (void)std::vector({num}); // Fail (void)std::vector({num}); } ``` In th

[clang] [clang-tools-extra] [lldb] [llvm] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-04-30 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/132853 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] [RawPtrRefMemberChecker] Make RawPtrRefMemberChecker consistent with other checkers (PR #137559)

2025-04-30 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/137559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0a1dde1 - [Clang] Fix GPU match any truncating 64-bit lane mask

2025-04-30 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2025-04-30T16:25:28-05:00 New Revision: 0a1dde1d7957531701ba56e357276033a927f496 URL: https://github.com/llvm/llvm-project/commit/0a1dde1d7957531701ba56e357276033a927f496 DIFF: https://github.com/llvm/llvm-project/commit/0a1dde1d7957531701ba56e357276033a927f496.diff

[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-04-30 Thread Finn Plummer via cfe-commits
@@ -5209,6 +5211,92 @@ void Parser::ParseMicrosoftUuidAttributeArgs(ParsedAttributes &Attrs) { } } +void Parser::ParseMicrosoftRootSignatureAttributeArgs(ParsedAttributes &Attrs) { + assert(Tok.is(tok::identifier) && "Not a Microsoft attribute list"); + IdentifierInfo *R

[clang] af4aeb3 - [RawPtrRefMemberChecker] Make RawPtrRefMemberChecker consistent with other checkers (#137559)

2025-04-30 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-04-30T14:27:39-07:00 New Revision: af4aeb325c37832e399283763345d4fc47f449eb URL: https://github.com/llvm/llvm-project/commit/af4aeb325c37832e399283763345d4fc47f449eb DIFF: https://github.com/llvm/llvm-project/commit/af4aeb325c37832e399283763345d4fc47f449eb.diff

[clang] [C] Modify -Wdefault-const-init (PR #137961)

2025-04-30 Thread Nathan Chancellor via cfe-commits
https://github.com/nathanchance approved this pull request. Thanks, this should allow us to try and keep `-Wdefault-const-init-var-unsafe` enabled while disabling `-Wdefault-const-init-field-unsafe`. https://github.com/llvm/llvm-project/pull/137961 __

[clang] [RawPtrRefMemberChecker] Make RawPtrRefMemberChecker consistent with other checkers (PR #137559)

2025-04-30 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/137559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RawPtrRefMemberChecker] Make RawPtrRefMemberChecker consistent with other checkers (PR #137559)

2025-04-30 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/137559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-04-30 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/132853 >From cea7c581ff90952d112d912da02de688e09112f7 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Wed, 29 Jan 2025 12:49:29 -0800 Subject: [PATCH] [clang][modules] Lazily load by name lookups in module maps

[clang] [flang] [flang][flang-driver] Support flag -finstrument-functions (PR #137996)

2025-04-30 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/137996 >From bb486c5e7cbe7b1c4a87469e06ca51bf49ddd081 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 29 Apr 2025 14:41:55 -0500 Subject: [PATCH 1/3] [flang] Support flag -finstrument-functions --- clang/

[clang] [clang-tools-extra] [lldb] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-04-30 Thread Michael Spencer via cfe-commits
Bigcheese wrote: I believe the Linux test failure was due to a test that should have failed. It had a case insensitive VFS for the headers, but not for the modulemap. When looking up `fw.framework/Modules/module.modulemap` it should fail because that path doesn't exist, and isn't made case ins

[clang] [llvm] Reland: [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #136046)

2025-04-30 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,127 @@ +//===--- RunOnNewStack.cpp - Crash Recovery ---===// +// +// 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] [OpenACC][CIR] Start work to lower 'loop' (PR #137972)

2025-04-30 Thread Erich Keane via cfe-commits
erichkeane wrote: > > In the future, we'll have to teach the OpenACC dialect how to derive the > > upperbound, lowerbound, and step from the cir.for loop > > Yea, even better if the `cir.for` representation can itself be improved to > expose that information (either by transforming it into a m

[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-04-30 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/137690 >From 0ab73ae597164aa039be69534056edbe26e55243 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Mon, 28 Apr 2025 18:42:10 + Subject: [PATCH 01/10] [HLSL][RootSignature] Define and integrate rootsig clang a

<    1   2   3   4   5   >