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

2025-04-30 Thread Erich Keane via cfe-commits
@@ -102,3 +102,20 @@ size_type max_size() { // CHECK: %3 = cir.cast(integral, %2 : !s32i), !u64i // CHECK: %4 = cir.const #cir.int<8> : !u64i // CHECK: %5 = cir.binop(div, %3, %4) : !u64i + +void ref_arg(int &x) { + int y = x; + x = 3; +} erichkeane wro

[clang] [Preprocessor] Do not expand macros if the input is already preprocessed (PR #137665)

2025-04-30 Thread Michael Spencer via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= Message-ID: In-Reply-To: Bigcheese wrote: module maps don't get preprocessed, so I don't think it matters what that is set to. For normal module.modulemap files `Preprocessed` is `false`. I think it's fine to remove the true and see if anything breaks

[clang] [Clang][CodeGen] Add workaround for old glibc `__PTR_ALIGN` macro (PR #137851)

2025-04-30 Thread Eli Friedman via cfe-commits
@@ -4820,6 +4820,15 @@ bool CodeGenFunction::isUnderlyingBasePointerConstantNull(const Expr *E) { const Expr *UnderlyingBaseExpr = E->IgnoreParens(); while (auto *BaseMemberExpr = dyn_cast(UnderlyingBaseExpr)) UnderlyingBaseExpr = BaseMemberExpr->getBase()->IgnoreParen

[clang] [Clang][MicrosoftMangle] Implement mangling for ConstantMatrixType (PR #134930)

2025-04-30 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#138017 https://github.com/llvm/llvm-project/pull/134930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not warn for serialized builtin or command-line definitions (PR #137306)

2025-04-30 Thread Serge Pavlov via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= Message-ID: In-Reply-To: https://github.com/spavloff approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/137306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

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

2025-04-30 Thread via cfe-commits
Noustaa wrote: Code autocomplete works just fine with CodePatterns::None but include autocomplete does not work anymore. Gonna investigate when i have some time. https://github.com/llvm/llvm-project/pull/137613 ___ cfe-commits mailing list cfe-commits

[clang] [HLSL][RootSignature] Add lexing support for floating points (PR #137720)

2025-04-30 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/137720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-se

[clang] 6274cdb - [clang] Fix UEFI Target info (#127290)

2025-04-30 Thread via cfe-commits
Author: Prabhu Rajasekaran Date: 2025-04-30T10:07:57-07:00 New Revision: 6274cdb9a6714908c8a4e30d2ef0bf22a6949065 URL: https://github.com/llvm/llvm-project/commit/6274cdb9a6714908c8a4e30d2ef0bf22a6949065 DIFF: https://github.com/llvm/llvm-project/commit/6274cdb9a6714908c8a4e30d2ef0bf22a6949065.

[clang] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and older (PR #124651)

2025-04-30 Thread via cfe-commits
https://github.com/Un1q32 updated https://github.com/llvm/llvm-project/pull/124651 >From d4e97c4113086c3d2dfa3bf6e9ecfee377f8c4b6 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 27 Jan 2025 18:00:34 -0500 Subject: [PATCH 1/3] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and olde

[clang] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and older (PR #124651)

2025-04-30 Thread via cfe-commits
Un1q32 wrote: bump https://github.com/llvm/llvm-project/pull/124651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/132991 >From c476948593a80ed31765cdd711a626e4e03930ab Mon Sep 17 00:00:00 2001 From: hulxv Date: Tue, 25 Mar 2025 22:56:51 +0200 Subject: [PATCH 01/12] [include-cleaner] rename enabled flags to `disable-*` --- .../incl

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

2025-04-30 Thread Qiongsi Wu via cfe-commits
@@ -115,6 +115,15 @@ struct ModuleID { } }; +struct ExtendedModuleID { qiongsiwu wrote: Hmmm I think I am misunderstanding something. Is this what we are proposing? Instead of ``` std::vector ClangModuleDeps; ``` we have ``` std::vector> ClangModule

[clang] [CIR] Upstream support for switch statements case kinds (PR #138003)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: None (Andres-Salamanca) Changes This introduces support for the following cir::case kinds: - `Equal` - `AnyOf` - `Range` --- Full diff: https://github.com/llvm/llvm-project/pull/138003.diff 4 Files Affected: - (modified) clang/includ

[clang] [CIR] Upstream support for switch statements case kinds (PR #138003)

2025-04-30 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 HEAD~1 HEAD --extensions cpp,h -- clang/include/clang/CIR/MissingFeatures.h clang/li

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

2025-04-30 Thread Andy Kaylor via cfe-commits
@@ -102,3 +102,20 @@ size_type max_size() { // CHECK: %3 = cir.cast(integral, %2 : !s32i), !u64i // CHECK: %4 = cir.const #cir.int<8> : !u64i // CHECK: %5 = cir.binop(div, %3, %4) : !u64i + +void ref_arg(int &x) { + int y = x; + x = 3; +} andykaylor wro

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

2025-04-30 Thread Andy Kaylor via cfe-commits
@@ -439,7 +439,13 @@ LValue CIRGenFunction::emitDeclRefLValue(const DeclRefExpr *e) { cgm.errorNYI(e->getSourceRange(), "emitDeclRefLValue: static local"); } -return makeAddrLValue(addr, ty, AlignmentSource::Type); +// Drill into reference types. +LValue

[clang] [CIR] Upstream support for switch statements case kinds (PR #138003)

2025-04-30 Thread via cfe-commits
https://github.com/Andres-Salamanca created https://github.com/llvm/llvm-project/pull/138003 This introduces support for the following cir::case kinds: - `Equal` - `AnyOf` - `Range` >From ff564e64a2ca9948e51c174a5e7a71b05acea510 Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Wed, 30 Ap

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

2025-04-30 Thread Tarun Prabhu via cfe-commits
@@ -124,6 +128,8 @@ struct MLIRToLLVMPassPipelineConfig : public FlangEPCallBacks { bool UnsafeFPMath = false; ///< Set unsafe-fp-math attribute for functions. bool NSWOnLoopVarInc = true; ///< Add nsw flag to loop variable increments. bool EnableOpenMP = false; ///< Ena

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-04-30 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Can you add more details in the summary. Specifically your approach to fixing the issue. Something along the lines of "In GetFullTypeForDeclarator ... moved check ... b/c ..." https://github.com/llvm/llvm-project/pull/137899 ___

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

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

[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 updated https://github.com/llvm/llvm-project/pull/137421 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] [CUDA][HIP] Add a __device__ version of std::__glibcxx_assert_fail() (PR #136133)

2025-04-30 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,35 @@ +// libstdc++ uses the non-constexpr function std::__glibcxx_assert_fail() +// to trigger compilation errors when the __glibcxx_assert(cond) macro +// is used in a constexpr context. +// Compilation fails when using code from the libstdc++ (such as std::array) on

[clang-tools-extra] [clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-pointer-arithmetic (PR #127394)

2025-04-30 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp edited https://github.com/llvm/llvm-project/pull/127394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-30 Thread Razvan Lupusoru via cfe-commits
https://github.com/razvanlupusoru edited https://github.com/llvm/llvm-project/pull/137972 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for switch statements case kinds (PR #138003)

2025-04-30 Thread via cfe-commits
Andres-Salamanca wrote: @andykaylor https://github.com/llvm/llvm-project/pull/138003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ea0e6e3 - [OpenACC] Improve 'loop' content restrictions

2025-04-30 Thread via cfe-commits
Author: erichkeane Date: 2025-04-30T12:02:52-07:00 New Revision: ea0e6e33835fe9fada89f77cc3a6cd74eb690067 URL: https://github.com/llvm/llvm-project/commit/ea0e6e33835fe9fada89f77cc3a6cd74eb690067 DIFF: https://github.com/llvm/llvm-project/commit/ea0e6e33835fe9fada89f77cc3a6cd74eb690067.diff LO

[clang-tools-extra] [clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-pointer-arithmetic (PR #127394)

2025-04-30 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: LGTM in general, but won't this fail with a std::map, since the key is an integer? Please rebase on top of latest main and resolve conflicts. https://github.com/llvm/llvm-project/pull/127394 ___ cfe-commits mailing list cfe-commi

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

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

[clang-tools-extra] [clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-pointer-arithmetic (PR #127394)

2025-04-30 Thread Carlos Galvez via cfe-commits
@@ -106,6 +106,10 @@ Changes in existing checks ` check to allow specifying additional C++ member functions to match. +- Improved :doc:`cppcoreguidelines-pro-bounds-pointer-arithmetic + ` check by + fix false positives related to operator overloading and templates. -

[clang-tools-extra] [clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-pointer-arithmetic (PR #127394)

2025-04-30 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp edited https://github.com/llvm/llvm-project/pull/127394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-30 Thread Andy Kaylor via cfe-commits
@@ -102,3 +102,20 @@ size_type max_size() { // CHECK: %3 = cir.cast(integral, %2 : !s32i), !u64i // CHECK: %4 = cir.const #cir.int<8> : !u64i // CHECK: %5 = cir.binop(div, %3, %4) : !u64i + +void ref_arg(int &x) { + int y = x; + x = 3; +} andykaylor wro

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

2025-04-30 Thread Razvan Lupusoru via cfe-commits
@@ -13,17 +13,103 @@ #include "CIRGenBuilder.h" #include "CIRGenFunction.h" #include "CIRGenOpenACCClause.h" -#include "mlir/Dialect/OpenACC/OpenACC.h" + #include "clang/AST/OpenACCClause.h" #include "clang/AST/StmtOpenACC.h" +#include "mlir/Dialect/OpenACC/OpenACC.h" + us

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

2025-04-30 Thread Razvan Lupusoru via cfe-commits
https://github.com/razvanlupusoru approved this pull request. Thank you Erich! Your prose on possibilities and challenges is a great idea for inclusion. https://github.com/llvm/llvm-project/pull/137972 ___ cfe-commits mailing list cfe-commits@lists.ll

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

2025-04-30 Thread Razvan Lupusoru via cfe-commits
@@ -13,17 +13,103 @@ #include "CIRGenBuilder.h" #include "CIRGenFunction.h" #include "CIRGenOpenACCClause.h" -#include "mlir/Dialect/OpenACC/OpenACC.h" + #include "clang/AST/OpenACCClause.h" #include "clang/AST/StmtOpenACC.h" +#include "mlir/Dialect/OpenACC/OpenACC.h" + us

[clang] [CUDA][HIP] Add a __device__ version of std::__glibcxx_assert_fail() (PR #136133)

2025-04-30 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B commented: LGTM in principle. Now the question is -- how do we test it? There are multiple libstdc++ library versions in the wild and we must not break any of them. We do have some testing on CUDA test bots (which I've just discovered to be silently broken for a whil

[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] f62f36b - [clang][NFC] Avoid a duplicate variable in SemaExprCXX.cpp (#137464)

2025-04-30 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2025-04-30T10:30:08+02:00 New Revision: f62f36b91de684ddfe129532e3a5086009b16f34 URL: https://github.com/llvm/llvm-project/commit/f62f36b91de684ddfe129532e3a5086009b16f34 DIFF: https://github.com/llvm/llvm-project/commit/f62f36b91de684ddfe129532e3a5086009b16f

[clang] [clang][NFC] Avoid a duplicate variable in SemaExprCXX.cpp (PR #137464)

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

[clang] [RISCV] Fix generation of DWARF info for vector segmented types (PR #137941)

2025-04-30 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/137941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Add v3 variants of async_work_group_copy/async_work_group_strided_copy/prefetch (PR #137932)

2025-04-30 Thread Fraser Cormack via cfe-commits
@@ -9,15 +9,31 @@ #define __CLC_DST_ADDR_SPACE local #define __CLC_SRC_ADDR_SPACE global #define __CLC_BODY -#include +#include +#undef __CLC_DST_ADDR_SPACE frasercrmck wrote: We probably don't need to `undef` and re-`define` here, when `local/global` isn'

[libclc] [libclc] Add v3 variants of async_work_group_copy/async_work_group_strided_copy/prefetch (PR #137932)

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

[libclc] [libclc] Add v3 variants of async_work_group_copy/async_work_group_strided_copy/prefetch (PR #137932)

2025-04-30 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. Thanks. We could probably come up with some kind of combined `gentype.inc` that does them both at once (though both currently `undef` `__CLC_BODY` after they finish so we'd need to be able to stop that, or preserve `__CLC_BODY` across

[clang] [clang] ownership_returns attribute takes no more than 2 arguments (PR #137897)

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

[clang] 7752e0a - Revert "[clang-format] Add OneLineFormatOffRegex option (#137577)"

2025-04-30 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2025-04-30T00:12:41-07:00 New Revision: 7752e0a10b25da2f2eadbed10606bd5454dbca05 URL: https://github.com/llvm/llvm-project/commit/7752e0a10b25da2f2eadbed10606bd5454dbca05 DIFF: https://github.com/llvm/llvm-project/commit/7752e0a10b25da2f2eadbed10606bd5454dbca05.diff LOG:

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-04-30 Thread Oliver Stannard via cfe-commits
ostannard wrote: That looks like the expected consequence of this change: * Previously, the anonymous bitfield was erroneously given a 64-bit container, so it occupied 7 copies of the container type, starting at byte 8 of the struct and ending at 64. * Now, it is given a 128-bit container, as r

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-04-30 Thread Nathan Ridge via cfe-commits
@@ -223,33 +226,26 @@ SymbolSlab indexStandardLibrary(llvm::StringRef HeaderSources, return Symbols; } - SymbolCollector::Options IndexOpts; - IndexOpts.Origin = SymbolOrigin::StdLib; - IndexOpts.CollectMainFileSymbols = false; - IndexOpts.CollectMainFileRefs = fals

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-04-30 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/133681 >From 451a88947bda87daa5934cc5c2d55f9e57a5cfda Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 31 Mar 2025 02:25:45 -0400 Subject: [PATCH] [clangd] Store documentation when indexing standard librar

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-04-30 Thread Nathan Ridge via cfe-commits
@@ -158,6 +158,43 @@ TEST(StdLibTests, EndToEnd) { UnorderedElementsAre(StdlibSymbol("list"), StdlibSymbol("vector"))); } +TEST(StdLibTests, StdLibDocComments) { + Config Cfg; + Cfg.Index.StandardLibrary = true; + WithContextValue Enabled(Config::Key, std::move(Cfg));

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-04-30 Thread Mariya Podchishchaeva via cfe-commits
@@ -231,6 +231,13 @@ namespace DeprecatedVolatile { a = c = a; b += a; } + + volatile struct amber jurassic(); Fznamznon wrote: As I can see, if the return type is not a struct/class, the warning is issued. Could you please add a test case with vol

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-04-30 Thread Mariya Podchishchaeva via cfe-commits
@@ -5056,13 +5056,13 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, S.Diag(DeclType.Loc, diag::err_func_returning_qualified_void) << T; } else diagnoseRedundantReturnTypeQualifiers(S, T, D, chunkIndex); - -//

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-04-30 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: Thank you for the fix, could you please also add a release note? https://github.com/llvm/llvm-project/pull/137899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-04-30 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/137899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   >