[clang] [Clang][Docs][NFC] Correct documentation for the CPATH environment variable (PR #129113)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Honermann (tahonermann) Changes Clang's [current documentation for the `CPATH` environment variable](https://clang.llvm.org/docs/CommandGuide/clang.html#envvar-CPATH) states that paths it specifies are added as system header search pa

[clang] [Clang][Docs][NFC] Correct documentation for the CPATH environment variable (PR #129113)

2025-02-27 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann created https://github.com/llvm/llvm-project/pull/129113 Clang's [current documentation for the `CPATH` environment variable](https://clang.llvm.org/docs/CommandGuide/clang.html#envvar-CPATH) states that paths it specifies are added as system header search paths.

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/129072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Fix resrouce wrapper declaration (PR #129100)

2025-02-27 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/129100 >From 6961d5683a4bc38c2fee053bc956475d0ccb0b80 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Tue, 4 Feb 2025 11:47:42 -0500 Subject: [PATCH 1/2] [HLSL] Fix resrouce wrapper declaration The resource wrappe

[clang] [NFC] [clang] [sanitize] add autogen test for array-bounds debuginfo (PR #128976)

2025-02-27 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/128976 >From 1903289d8fc62619f107094c9cb8b1dbccc09f91 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Wed, 26 Feb 2025 16:59:52 -0800 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread Farzon Lotfi via cfe-commits
@@ -2305,6 +2305,24 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { TheCall->setType(ArgTyA); break; } + case Builtin::BI__builtin_hlsl_or: { +if (SemaRef.checkArgCount(TheCall, 2)) farzonl wrote: we are doin

[clang] [HLSL] Fix resrouce wrapper declaration (PR #129100)

2025-02-27 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 cfdeca394e8c212bf0ff38e5bb8a8ed36954132c 6961d5683a4bc38c2fee053bc956475d0ccb0b80 --e

[clang] db4dd33 - [NFC] [clang] [sanitize] add autogen test for array-bounds debuginfo (#128976)

2025-02-27 Thread via cfe-commits
Author: Florian Mayer Date: 2025-02-27T14:00:15-08:00 New Revision: db4dd333d045b2b4eeb08d2c28fceb31cf0d59ac URL: https://github.com/llvm/llvm-project/commit/db4dd333d045b2b4eeb08d2c28fceb31cf0d59ac DIFF: https://github.com/llvm/llvm-project/commit/db4dd333d045b2b4eeb08d2c28fceb31cf0d59ac.diff

[clang] [NFC] [clang] [sanitize] add autogen test for array-bounds debuginfo (PR #128976)

2025-02-27 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/128976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d91e5c3 - [verify] Improve the error messages with multiple active prefixes (#126068)

2025-02-27 Thread via cfe-commits
Author: Mészáros Gergely Date: 2025-02-27T17:58:34+01:00 New Revision: d91e5c301353b012b338aa9920a941d8b5fc28a4 URL: https://github.com/llvm/llvm-project/commit/d91e5c301353b012b338aa9920a941d8b5fc28a4 DIFF: https://github.com/llvm/llvm-project/commit/d91e5c301353b012b338aa9920a941d8b5fc28a4.di

[libunwind] [libunwind] Add unw_strerror function (PR #129084)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Tristan Ross (RossComputerGuy) Changes Original implementation comes from https://github.com/reckenrode/nixpkgs/commit/099adeef42048d853df03f181103c6985c356d21 with permission from @reckenrode This implements the `unw_strerror` funct

[clang] [clang][deps] Propagate the entire service (PR #128959)

2025-02-27 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/128959 >From cb389c006e5ca28d5baef73625776a3e0e58b8af Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 26 Feb 2025 15:12:43 -0800 Subject: [PATCH 1/2] [clang][deps] Propagate the whole service Adding any kin

[libunwind] [libunwind] Add unw_strerror function (PR #129084)

2025-02-27 Thread Tristan Ross via cfe-commits
https://github.com/RossComputerGuy updated https://github.com/llvm/llvm-project/pull/129084 >From 9357008872e3b12b3601a45d4fd5453dfa779ff3 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Thu, 27 Feb 2025 09:10:22 -0800 Subject: [PATCH] [libunwind] Add unw_strerror function Co-authored-by: Ra

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/128979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [verify] Improve the error messages with multiple active prefixes (PR #126068)

2025-02-27 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis closed https://github.com/llvm/llvm-project/pull/126068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-27 Thread Alexey Bataev via cfe-commits
@@ -2882,6 +2882,13 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( /*ReadDirectiveWithinMetadirective=*/true); break; } +// If no match is found and no otherwise clause is present, skip +// OMP5.2 Chapter 7.4: If no otherwise cla

[libunwind] [libunwind] Add unw_strerror function (PR #129084)

2025-02-27 Thread Tristan Ross via cfe-commits
https://github.com/RossComputerGuy created https://github.com/llvm/llvm-project/pull/129084 Original implementation comes from https://github.com/reckenrode/nixpkgs/commit/099adeef42048d853df03f181103c6985c356d21 with permission from @reckenrode This implements the `unw_strerror` function whi

[clang] [clang][deps] Propagate the entire service (PR #128959)

2025-02-27 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/128959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Add unw_strerror function (PR #129084)

2025-02-27 Thread Tristan Ross via cfe-commits
https://github.com/RossComputerGuy updated https://github.com/llvm/llvm-project/pull/129084 >From 144809d95fab64843761629b384f9d41c1887cf3 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Thu, 27 Feb 2025 09:10:22 -0800 Subject: [PATCH] [libunwind] Add unw_strerror function Co-authored-by: Ra

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread Damyan Pepper via cfe-commits
@@ -290,6 +290,24 @@ _HLSL_BUILTIN_ALIAS(__builtin_hlsl_and) bool4 and(bool4 x, bool4 y); // clang-format on +//===--===// +// or builtins +//===

[clang] [NFC][analyzer] Simplify ownership of checker objects (PR #128887)

2025-02-27 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/128887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ac7c8eb - [NFC][analyzer] Simplify ownership of checker objects (#128887)

2025-02-27 Thread via cfe-commits
Author: Donát Nagy Date: 2025-02-27T18:33:50+01:00 New Revision: ac7c8eb4de0b0f8f9e01df3a12e9a7f7f20899e9 URL: https://github.com/llvm/llvm-project/commit/ac7c8eb4de0b0f8f9e01df3a12e9a7f7f20899e9 DIFF: https://github.com/llvm/llvm-project/commit/ac7c8eb4de0b0f8f9e01df3a12e9a7f7f20899e9.diff LO

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-27 Thread Zahira Ammarguellat via cfe-commits
@@ -2882,6 +2882,13 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( /*ReadDirectiveWithinMetadirective=*/true); break; } +// If no match is found and no otherwise clause is present, skip +// OMP5.2 Chapter 7.4: If no otherwise cla

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,119 @@ +//===- CIROpsEnumsDialect.h - MLIR Dialect for CIR --*- C++ andykaylor wrote: Also, the coding guidelines have changed recently, so the filename doesn't need to be in this line. ```suggestion //===--

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread Andy Kaylor via cfe-commits
@@ -176,6 +177,18 @@ void CIRGenModule::emitGlobalVarDefinition(const clang::VarDecl *vd, } varOp.setInitialValueAttr(initializer); } + +// Set CIR's linkage type as appropriate. +cir::GlobalLinkageKind linkage = +getCIRLinkageVarDefinition(vd,

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: Can you also update `clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp` to use the linkage? There are two places marked by `cir::MissingFeatures::opGlobalLinkage()` that would need to be updated, plus (hopefully) test changes. It would also be good t

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread Andy Kaylor via cfe-commits
@@ -36,6 +36,10 @@ struct MissingFeatures { static bool opGlobalConstant() { return false; } static bool opGlobalAlignment() { return false; } static bool opGlobalLinkage() { return false; } andykaylor wrote: Can this be removed now? https://github.com/

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,29 @@ +//===- CIROpInterfaces.h - CIR Op Interfaces *- C++ -*-===// andykaylor wrote: ```suggestion //===--===// ``` https://github.com/llvm/llvm-project/pull/129

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,22 @@ +//- CIROpInterfaces.cpp - Interface to AST Attributes ---===// +// +// 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: Apache

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,119 @@ +//===- CIROpsEnumsDialect.h - MLIR Dialect for CIR --*- 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-Iden

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,63 @@ +//===- CIROpInterfaces.td - CIR Op Interface Definitions *- 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-Identifier: Apa

[libunwind] [libunwind] Add unw_strerror function (PR #129084)

2025-02-27 Thread Tristan Ross via cfe-commits
https://github.com/RossComputerGuy updated https://github.com/llvm/llvm-project/pull/129084 >From b976a982b6ea9963bd88744b8ca1314852948a60 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Thu, 27 Feb 2025 09:10:22 -0800 Subject: [PATCH] [libunwind] Add unw_strerror function Co-authored-by: Ra

[libunwind] [libunwind] Add unw_strerror function (PR #129084)

2025-02-27 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 d91e5c301353b012b338aa9920a941d8b5fc28a4 b976a982b6ea9963bd88744b8ca1314852948a60 --e

[libunwind] [libunwind] Add unw_strerror function (PR #129084)

2025-02-27 Thread Tristan Ross via cfe-commits
https://github.com/RossComputerGuy updated https://github.com/llvm/llvm-project/pull/129084 >From 8fed3873f228232081533b614ac534473f6aa996 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Thu, 27 Feb 2025 09:10:22 -0800 Subject: [PATCH] [libunwind] Add unw_strerror function Co-authored-by: Ra

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp commented: Thanks for the updates. Please be sure to tag the issue that this is addressing in the PR description (something like "Closes #".) Or at least make sure that it is linked in the "Development" section. I won't be clicking Approve because we need approv

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-27 Thread Alexey Bataev via cfe-commits
@@ -2882,6 +2882,13 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( /*ReadDirectiveWithinMetadirective=*/true); break; } +// If no match is found and no otherwise clause is present, skip +// OMP5.2 Chapter 7.4: If no otherwise cla

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-02-27 Thread Michael Jabbour via cfe-commits
https://github.com/michael-jabbour-sonarsource updated https://github.com/llvm/llvm-project/pull/114240 >From cc3cf25da67c9f8b9edabb318c6011cad9bd2f58 Mon Sep 17 00:00:00 2001 From: Michael Jabbour Date: Tue, 29 Oct 2024 11:16:09 +0100 Subject: [PATCH 1/9] [NFC] Factor out RetireNodesFromMerged

[clang] [flang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-02-27 Thread via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-27 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,163 @@ +//===--- UseNumericLimitsCheck.cpp - clang-tidy ---===// +// +// 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-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-27 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,163 @@ +//===--- UseNumericLimitsCheck.cpp - clang-tidy ---===// +// +// 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] [WebAssembly] Make WASI -threads environment behave as -pthread (PR #129164)

2025-02-27 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/129164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add HLSLResourceBindingAttr to default constant buffer numeric declarations ($Globals) (PR #128981)

2025-02-27 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/128981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 746d8b0 - [Clang][AMDGPU] Use 32-bit index for SWMMAC builtins (#129101)

2025-02-27 Thread via cfe-commits
Author: Shilei Tian Date: 2025-02-27T23:28:48-05:00 New Revision: 746d8b0740095ea3939fef0112a51953ca22cd29 URL: https://github.com/llvm/llvm-project/commit/746d8b0740095ea3939fef0112a51953ca22cd29 DIFF: https://github.com/llvm/llvm-project/commit/746d8b0740095ea3939fef0112a51953ca22cd29.diff L

[clang] [llvm] [Clang][AMDGPU] Use 32-bit index for SWMMAC builtins (PR #129101)

2025-02-27 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/129101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Change BracedInitializerIndentWidth to int (PR #128988)

2025-02-27 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/128988 >From ef2548f777bdee34bbe6c36bd8c061c00191629b Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 26 Feb 2025 18:32:08 -0800 Subject: [PATCH 1/2] [clang-format] Change BracedInitializerIndentWidth to int Fixes #

[clang] [Clang][OpenCL] Wrap image functions with the macro (PR #129171)

2025-02-27 Thread Victor Mustya via cfe-commits
https://github.com/vmustya closed https://github.com/llvm/llvm-project/pull/129171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-27 Thread Jan Voung via cfe-commits
@@ -114,11 +114,12 @@ Changes in existing checks and accessing ``value``. The option `IgnoreSmartPointerDereference` should no longer be needed and will be removed. +- Improved :doc:`bugprone-unchecked-optional-access jvoung wrote: Instead of starting a n

[clang] [clang-format] Change BracedInitializerIndentWidth to int (PR #128988)

2025-02-27 Thread Owen Pan via cfe-commits
@@ -1441,8 +1441,9 @@ TEST(ConfigParseTest, GetStyleOfFile) { ASSERT_EQ(*Style9, SubSubStyle); // Test 9.8: use inheritance from a file without BasedOnStyle - ASSERT_TRUE(FS.addFile("/e/withoutbase/.clang-format", 0, - llvm::MemoryBuffer::getMemBuf

[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

2025-02-27 Thread Oliver Hunt via cfe-commits
@@ -162,3 +162,8 @@ struct A { }; A<0>::B a; } + +template void shadow9() { // expected-note{{template parameter is declared here}} + using arr = int[1]; // expected-warning@+1 {{decomposition declarations are a C++17 extension}} + auto [T] = arr{}; // expected-error {{de

[clang] [analyzer] Add more C++ list initializer tests and regroup (PR #129182)

2025-02-27 Thread Michael Flanders via cfe-commits
https://github.com/Flandini created https://github.com/llvm/llvm-project/pull/129182 Related to #127702. I figured that if I change list initialization like mentioned in #127702, then I would want these tests anyways, so I am adding them first. This adds more test coverage of C++ list initial

[clang] [analyzer] Add more C++ list initializer tests and regroup (PR #129182)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Flanders (Flandini) Changes Related to #127702. I figured that if I change list initialization like mentioned in #127702, then I would want these tests anyways, so I am adding them first. This adds more test coverage of C++ list i

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-02-27 Thread Craig Topper via cfe-commits
@@ -974,17 +974,20 @@ void RISCVFrameLowering::emitPrologue(MachineFunction &MF, emitCFIForCSI(MBB, MBBI, getUnmanagedCSI(MF, CSI)); // Generate new FP. - if (hasFP(MF) && RVFI->getPushPopKind(MF) != - RISCVMachineFunctionInfo::PushPopKind::VendorXqc

[clang] [-Wunsafe-buffer-usage] Fix a potential overflow bug reported by #126334 (PR #129169)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Ziqing Luo (ziqingluo-90) Changes `MeasureTokenLength` may return an unsigned 0 representing failure in obtaining length of a token. The analysis now gives up on such cases. Otherwise, there might be issues caused by unsigned in

[clang] [-Wunsafe-buffer-usage] Fix a potential overflow bug reported by #126334 (PR #129169)

2025-02-27 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: CC: @dtarditi https://github.com/llvm/llvm-project/pull/129169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SystemZ] Add header guard macros to vecintrin.h (PR #129170)

2025-02-27 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [HLSL] Add HLSLResourceBindingAttr to default constant buffer numeric declarations ($Globals) (PR #128981)

2025-02-27 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. https://github.com/llvm/llvm-project/pull/128981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Fix a potential overflow bug reported by #126334 (PR #129169)

2025-02-27 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 created https://github.com/llvm/llvm-project/pull/129169 `MeasureTokenLength` may return an unsigned 0 representing failure in obtaining length of a token. The analysis now gives up on such cases. Otherwise, there might be issues caused by unsigned integer "ove

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-27 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. Abstractly the current one looks good to stop the bleeding first. But for the issue itself, I still feel we can fix it in the middle end. Since the case a coroutine without a suspend point is relatively rare case to me. https://github.c

[clang] [ARM] Introduce -mtp=auto and make it the default (PR #128901)

2025-02-27 Thread via cfe-commits
https://github.com/Zhenhang1213 updated https://github.com/llvm/llvm-project/pull/128901 >From 89f9a4dd1139813545536ffd46b290f435632e45 Mon Sep 17 00:00:00 2001 From: Austin Date: Thu, 27 Feb 2025 00:11:56 +0800 Subject: [PATCH] [ARM] Introduce -mtp=auto and make it the default This adds a new

[clang] 14170b1 - [HLSL] Add HLSLResourceBindingAttr to default constant buffer numeric declarations ($Globals) (#128981)

2025-02-27 Thread via cfe-commits
Author: Helena Kotas Date: 2025-02-27T19:04:18-08:00 New Revision: 14170b16028c087ca154878f5ed93d3089a965c6 URL: https://github.com/llvm/llvm-project/commit/14170b16028c087ca154878f5ed93d3089a965c6 DIFF: https://github.com/llvm/llvm-project/commit/14170b16028c087ca154878f5ed93d3089a965c6.diff

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-27 Thread Erik Jensen via cfe-commits
rkjnsn wrote: Even for a real suspend, though, isn't it still possible for the coroutine to be resumed on a different thread, completed, and the frame deleted, all before the coroutine ramp finishes executing on the current thread? https://github.com/llvm/llvm-project/pull/127653 _

[clang] [llvm] [X86][CodeGen] - Use shift operators instead of built-ins for SSE emulation of MMX intrinsics. (PR #129197)

2025-02-27 Thread Pawan Nirpal via cfe-commits
https://github.com/pawan-nirpal-031 edited https://github.com/llvm/llvm-project/pull/129197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-27 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Even for a real suspend, though, isn't it still possible for the coroutine to > be resumed on a different thread, completed, and the frame deleted, all > before the coroutine ramp finishes executing on the current thread? Technically possible, you got me. https://github.co

[clang] [llvm] [X86][CodeGen] - Use shift operators instead of built-ins for SSE emulation of MMX intrinsics. (PR #129197)

2025-02-27 Thread Matt Arsenault via cfe-commits
@@ -880,11 +880,11 @@ _mm_sll_si64(__m64 __m, __m64 __count) ///A 32-bit integer value. /// \returns A 64-bit integer vector containing the left-shifted value. If /// \a __count is greater or equal to 64, the result is set to 0. -static __inline__ __m64 __DEFAULT_FN_ATT

[clang] [clang] Always pass fp128 arguments indirectly on Windows (PR #115052)

2025-02-27 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 updated https://github.com/llvm/llvm-project/pull/115052 >From 60b07161e8668c2bc3ee5d7a4c470a90a7673178 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Tue, 5 Nov 2024 07:00:35 -0500 Subject: [PATCH 1/2] [clang] Add fp128 ABI tests for MinGW (NFC) Duplicate `win64

[clang] [ARM] Introduce -mtp=auto and make it the default (PR #128901)

2025-02-27 Thread via cfe-commits
https://github.com/Zhenhang1213 updated https://github.com/llvm/llvm-project/pull/128901 >From 77a4ee6c390cf866aaa0fbdbead0fd3b99cac590 Mon Sep 17 00:00:00 2001 From: Austin Date: Thu, 27 Feb 2025 00:11:56 +0800 Subject: [PATCH] [ARM] Introduce -mtp=auto and make it the default This adds a new

[clang] [clang] Always pass `fp128` arguments indirectly on Windows (PR #115052)

2025-02-27 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 edited https://github.com/llvm/llvm-project/pull/115052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add the C language instead of treating it like C++ (PR #128287)

2025-02-27 Thread Alexander Richardson via cfe-commits
@@ -3957,7 +3958,12 @@ LangOptions getFormattingLangOpts(const FormatStyle &Style) { LangOpts.Digraphs = LexingStd >= FormatStyle::LS_Cpp11; LangOpts.LineComment = 1; - LangOpts.CXXOperatorNames = Style.isCpp(); + + const auto Language = Style.Language; + LangOpts.C17

[clang] [llvm] [Clang][LLVM] Implement single-multi vectors MOP4{A/S} (PR #128854)

2025-02-27 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray deleted https://github.com/llvm/llvm-project/pull/128854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Check for uninitialized use in lambda within CXXOperatorCallExpr (PR #129198)

2025-02-27 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [llvm] [Clang][LLVM] Implement single-multi vectors MOP4{A/S} (PR #128854)

2025-02-27 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray deleted https://github.com/llvm/llvm-project/pull/128854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Pass fp128 indirectly and return in xmm0 on Windows (PR #115052)

2025-02-27 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 edited https://github.com/llvm/llvm-project/pull/115052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Pass fp128 indirectly and return in xmm0 on Windows (PR #115052)

2025-02-27 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 edited https://github.com/llvm/llvm-project/pull/115052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][AMDGPU] Use 32-bit index for SWMMAC builtins (PR #129101)

2025-02-27 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/129101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [memprof] Export __memprof_default_options_str on Darwin (PR #128920)

2025-02-27 Thread Ellis Hoag via cfe-commits
@@ -1617,6 +1617,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, } } + if (Sanitize.needsMemProfRt()) +if (hasExportSymbolDirective(Args)) + addExportedSymbol(CmdArgs, "___memprof_default_options_str"); ellishg wrote: @tere

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify -DTEST_FUNC=__builtin_hlsl_or +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify -DTEST_FUNC=__builtin_hlsl_and + + +bool t

[clang] [clang-tools-extra] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-27 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA edited https://github.com/llvm/llvm-project/pull/128437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/129072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add #pragma clang __debug module_lookup (PR #129158)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Michael Spencer (Bigcheese) Changes This can be used to trigger implicit module map lookup without also importing the module. This can be useful for debugging as it avoids loading the module map from the AST file, which has slight

[clang] [clang] Add #pragma clang __debug module_lookup (PR #129158)

2025-02-27 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/129158 This can be used to trigger implicit module map lookup without also importing the module. This can be useful for debugging as it avoids loading the module map from the AST file, which has slightly different s

[clang] [flang] [flang][RISCV] Add target-abi ModuleFlag. (PR #126188)

2025-02-27 Thread Kelvin Li via cfe-commits
@@ -464,6 +464,7 @@ static void parseTargetArgs(TargetOptions &opts, llvm::opt::ArgList &args) { if (const llvm::opt::Arg *a = args.getLastArg(clang::driver::options::OPT_mabi_EQ)) { +opts.abi = a->getValue(); llvm::StringRef V = a->getValue(); if (V

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-27 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam deleted https://github.com/llvm/llvm-project/pull/127113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-27 Thread Bruno Cardoso Lopes via cfe-commits
@@ -117,6 +117,24 @@ static void printOmittedTerminatorRegion(mlir::OpAsmPrinter &printer, /*printBlockTerminators=*/!omitRegionTerm(region)); } +//===--===// +// AllocaOp +//===

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread David Olsen via cfe-commits
https://github.com/dkolsen-pgi commented: Most of the things I would have commented were already mentioned by someone else. Just a couple small additional items. https://github.com/llvm/llvm-project/pull/129072 ___ cfe-commits mailing list cfe-commit

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread David Olsen via cfe-commits
@@ -2,100 +2,100 @@ // RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - | FileCheck %s char c; -// CHECK: cir.global @c : !cir.int +// CHECK: cir.global external @c : !cir.int signed char sc; -// CHECK: cir.global @sc : !cir.int +//

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread David Olsen via cfe-commits
@@ -0,0 +1,63 @@ +//===- CIROpInterfaces.td - CIR Op Interface Definitions *- 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-Identifier: Apa

[clang] [Clang] Treat constexpr-unknown value as invalid in `EvaluateAsInitializer` (PR #128409)

2025-02-27 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/128409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Generate __clang_call_terminate for Emscripten EH (PR #129020)

2025-02-27 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/129020 >From 92861b903905d4f3d2fa39772033282b2dbad758 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Thu, 27 Feb 2025 03:09:45 + Subject: [PATCH 1/3] [WebAssembly] Generate __clang_call_terminate for Emscripten E

[clang] [HLSL] error on out of bounds vector accesses (PR #128952)

2025-02-27 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/128952 >From 656d6e87466bfc85246f7abaedfe6549e566717b Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Wed, 26 Feb 2025 14:37:06 -0800 Subject: [PATCH 1/4] error on out of bounds vector accesses --- .../clang/Basic/Dia

[clang] [HLSL] error on out of bounds vector accesses (PR #128952)

2025-02-27 Thread Sarah Spall via cfe-commits
@@ -14017,6 +14017,24 @@ void Sema::CheckCastAlign(Expr *Op, QualType T, SourceRange TRange) { << TRange << Op->getSourceRange(); } +void Sema::CheckVectorAccess(const Expr *BaseExpr, const Expr *IndexExpr) { + const VectorType *VTy = BaseExpr->getType()->getAs(); + if

[clang] [WebAssembly] Generate __clang_call_terminate for Emscripten EH (PR #129020)

2025-02-27 Thread Derek Schuff via cfe-commits
https://github.com/dschuff approved this pull request. https://github.com/llvm/llvm-project/pull/129020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Generate __clang_call_terminate for Emscripten EH (PR #129020)

2025-02-27 Thread Heejin Ahn via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 %s -triple wasm32-unknown-unknown -fexceptions -fcxx-exceptions -emit-llvm -o - -std=c++11 2>&1 | FileCheck %s aheejin wrote: We don't do anything differently wrt EH depending on whether it is `unknown` or `emscripten` tripl

[clang] [Feat] Allow Finding across only parts of an AST. (PR #127423)

2025-02-27 Thread via cfe-commits
matts1 wrote: It's a general performance optimization. For example, you could write a predicate to check whether it's in the std namespace to avoid checking the standard library, or a predicate to check whether a class is a subclass of `proto.Message` to skip generated protobuf code. https://

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-27 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,82 @@ +//===--===// +// +// 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] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/128979 >From 08e191213d3abfc6a5f2af7ba3db35055dd040eb Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Wed, 26 Feb 2025 16:23:01 -0800 Subject: [PATCH 01/11] Format hlsl_intrinsics.h with clang-format ---

[clang] [clang-tools-extra] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-27 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA updated https://github.com/llvm/llvm-project/pull/128437 >From 319ad0b803b8c6c6c5405178335bd1f2258be4b8 Mon Sep 17 00:00:00 2001 From: Valentyn Yukhymenko Date: Sun, 23 Feb 2025 12:08:02 + Subject: [PATCH 1/7] first implementation and basic tests --- .../Mod

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for emitting unwind v2 information (equivalent to MSVC /d2epilogunwind) (PR #129142)

2025-02-27 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello created https://github.com/llvm/llvm-project/pull/129142 Adds support for emitting Windows x64 Unwind V2 information, includes support `/d2epilogunwind` in clang-cl. Unwind v2 adds information about the epilogs in functions such that the unwinder can unwind even

[clang] [llvm] [RISCV][MC] Implement MC for Base P extension (PR #123271)

2025-02-27 Thread Craig Topper via cfe-commits
@@ -0,0 +1,1050 @@ +//===-- RISCVInstrInfoP.td - RISC-V 'P' instructions ---*- tablegen -*-===// +// +// 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: A

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for emitting unwind v2 information (equivalent to MSVC /d2epilogunwind) (PR #129142)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Daniel Paoliello (dpaoliello) Changes Adds support for emitting Windows x64 Unwind V2 information, includes support `/d2epilogunwind` in clang-cl. Unwind v2 adds information about the epilogs in functions such that the unwinder can

[clang] [CUDA][HIP] fix virtual dtor host/device attr (PR #128926)

2025-02-27 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > Would it make sense to separate into separate patches deferred diag fix > (1a/1b on your list) from inference of destructor attributes? > > Deferred diags fix is straightforward, but destructor attribute inference may > need a longer discussion. split the deferred diag chang

<    1   2   3   4   >