[clang] [Clang] Add __builtin_bswapg (PR #162433)

2025-10-14 Thread via cfe-commits
https://github.com/clingfei updated https://github.com/llvm/llvm-project/pull/162433 >From 92466f3789ce1849ebee8a405efd42e191c591f5 Mon Sep 17 00:00:00 2001 From: clingfei <[email protected]> Date: Wed, 8 Oct 2025 15:05:44 +0800 Subject: [PATCH 1/7] [Clang] Add __builtin_bswapg --- clang/inclu

[clang] [CIR] Upstream pointer subtraction handling (PR #163306)

2025-10-14 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR + +typedef unsigned long size_type; + +size_type size(unsigned long *_start, unsigned long *_finish) { +

[clang] [CIR] Upstream pointer subtraction handling (PR #163306)

2025-10-14 Thread Andy Kaylor via cfe-commits
@@ -1499,6 +1499,48 @@ mlir::LogicalResult CIRToLLVMConstantOpLowering::matchAndRewrite( return mlir::success(); } +static uint64_t getTypeSize(mlir::Type type, mlir::Operation &op) { + mlir::DataLayout layout(op.getParentOfType()); + // For LLVM purposes we treat void as

[clang] [clang][docs] Fix typos in option names (PR #163482)

2025-10-14 Thread Jim Lin via cfe-commits
https://github.com/tclin914 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/163482 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ByteCode] Remove a redundant call to std::unique_ptr::get (NFC) (PR #163512)

2025-10-14 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/163512 None >From 57c5789859c278d78e18ba38d2a9425f74c270aa Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 12 Oct 2025 17:17:10 -0700 Subject: [PATCH] [ByteCode] Remove a redundant call to std::unique_ptr

[clang] [compiler-rt] [llvm] [WIP][SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-10-14 Thread via cfe-commits
https://github.com/koachan updated https://github.com/llvm/llvm-project/pull/162226 >From 99cd21841c3b325d3335af5b4110414a49ad9bb3 Mon Sep 17 00:00:00 2001 From: Koakuma Date: Tue, 7 Oct 2025 12:55:39 +0700 Subject: [PATCH 1/4] [WIP][SPARC] Properly handle CC for long double on sparc32 Pass a

[clang] [HLSL][NFC] Refactor structured buffer methods tests (PR #161908)

2025-10-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building `clang` at step 7 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/15438 Here is the r

[clang] [Clang] disallow constexpr with auto and explicit type in C23 (PR #163469)

2025-10-14 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/163469 >From 3856379ddbb59c6dcd813765571a67f635034a3c Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Wed, 15 Oct 2025 01:42:15 +0300 Subject: [PATCH] [Clang] disallow constexpr with auto and explicit type i

[clang] [clang] fix parsing of late parsed attributes with delayed template parsing (PR #163483)

2025-10-14 Thread Erich Keane via cfe-commits
@@ -1272,7 +1272,7 @@ Decl *Parser::ParseFunctionDefinition(ParsingDeclarator &D, // tokens and store them for late parsing at the end of the translation unit. if (getLangOpts().DelayedTemplateParsing && Tok.isNot(tok::equal) && TemplateInfo.Kind == ParsedTemplateKin

[clang-tools-extra] [clang-tidy] Fix a broken fix-it provided by `modernize-use-integer-sign-comparison` (PR #163488)

2025-10-14 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/163488 >From e34928f07504a4b0abf09b37c9c523cc9c44a9e8 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Tue, 14 Oct 2025 19:54:06 -0700 Subject: [PATCH 1/2] [clang-tidy] Fix a broken fix-it provided by `modern

[clang] [compiler-rt] [llvm] [X86] Add support for Wildcat Lake (PR #163214)

2025-10-14 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/163214 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix a broken fix-it provided by `modernize-use-integer-sign-comparison` (PR #163488)

2025-10-14 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/163488 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix a broken fix-it provided by `modernize-use-integer-sign-comparison` (PR #163488)

2025-10-14 Thread Victor Chernyakin via cfe-commits
@@ -152,6 +152,8 @@ void UseIntegerSignComparisonCheck::check( if (const auto *RHSCast = llvm::dyn_cast(RHS)) { SubExprRHS = RHSCast->getSubExpr(); R2.setEnd(SubExprRHS->getBeginLoc().getLocWithOffset(-1)); +R3.setBegin(Lexer::getLocForEndOfToken( +SubExpr

[clang] [Clang][LTO] Fix use of funified-lto and save-temps flags together (PR #162763)

2025-10-14 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,11 @@ +; Test that we do not duplicate the UnifiedLTO module flag. +; +; RUN: %clang_cc1 -emit-llvm -flto=full -funified-lto -o - %s | FileCheck %s bader wrote: That's right. https://github.com/llvm/llvm-project/pull/162763 ___

[clang] 23848e6 - [clang][PAC] Add ptrauth.h helpers for computing type discriminators (#163456)

2025-10-14 Thread via cfe-commits
Author: Oliver Hunt Date: 2025-10-15T01:15:35Z New Revision: 23848e606baea5c8e5239d56b032399811f54b77 URL: https://github.com/llvm/llvm-project/commit/23848e606baea5c8e5239d56b032399811f54b77 DIFF: https://github.com/llvm/llvm-project/commit/23848e606baea5c8e5239d56b032399811f54b77.diff LOG: [

[clang] [clang][docs] Fix typos in option names (PR #163482)

2025-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: KAWASHIMA Takahiro (kawashima-fj) Changes If you type option names in the currnet Clang Compiler User's Manual, you'll see: ```console $ clang -fnobasic-block-address-map -fnounique-internal-linkage-names -f-split-lto-unit test.c clang:

[clang] [clang][PAC] Add ptrauth.h helpers for computing type discriminators (PR #163456)

2025-10-14 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > @ojhunt Thanks for introducing this! It's probably worth applying the > auto-formatting suggestion before merging the PR Oh yeah, du, copying code while forgetting that we have reformatted a lot over time :D https://github.com/llvm/llvm-project/pull/163456

[clang] [clang][PAC] Add ptrauth.h helpers for computing type discriminators (PR #163456)

2025-10-14 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/163456 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] ThrowOp with Complex type as Subexpr (PR #163078)

2025-10-14 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/163078 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add Aggregate Expression LValue Visitors (PR #163410)

2025-10-14 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. Looks good, except a possibly missing test case https://github.com/llvm/llvm-project/pull/163410 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/li

[clang] [Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow AVX512 mask broadcast intrinsics to be used in constexpr (PR #163475)

2025-10-14 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 origin/main HEAD --extensions h,c -- clang/lib/Headers/avx512cdintrin.h clang/lib/Hea

[clang] [llvm] [RISCV] Support Zvfbfa codegen and C intrinsics (PR #161158)

2025-10-14 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/161158 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebKit Checkers] Treat a NS/CF global defined in a system header as a safe pointer origin (PR #161146)

2025-10-14 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/161146 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[HLSL][NFC] Refactor structured buffer methods tests (#161908)" (PR #163472)

2025-10-14 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/163472 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][SPIR-V] Add `-fspv-enable-maximal-reconvergence` flag to clang dxc. (PR #163474)

2025-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Lucie Choi (luciechoi) Changes Implement the frontend change to support maximal reconvergence feature. The next work is to generate the corresponding SPIR-V instructions (`OpExtension` and `OpExecutionMode`) based on the llvm ir a

[clang] [HLSL][NFC] Refactor structured buffer methods tests (PR #161908)

2025-10-14 Thread Helena Kotas via cfe-commits
hekota wrote: > Hi, this PR breaks many bots. Could you please fix it or revert if it needs > more investigation? Thanks! Thanks! I'll revert it. https://github.com/llvm/llvm-project/pull/161908 ___ cfe-commits mailing list [email protected]

[clang] [CIR] Upstream pointer subtraction handling (PR #163306)

2025-10-14 Thread Andy Kaylor via cfe-commits
@@ -1734,9 +1734,9 @@ mlir::Value ScalarExprEmitter::emitSub(const BinOpInfo &ops) { // LLVM we shall take VLA's, division by element size, etc. // // See more in `EmitSub` in CGExprScalar.cpp. - assert(!cir::MissingFeatures::ptrDiffOp()); - cgf.cgm.errorNYI("ptrdiff")

[clang] [HLSL][NFC] Refactor structured buffer methods tests (PR #161908)

2025-10-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/29046 Here is th

[clang] [HLSL][NFC] Refactor structured buffer methods tests (PR #161908)

2025-10-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-m68k-linux-cross` running on `suse-gary-m68k-cross` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/27/builds/17513 Here is the relevant piece

[clang] [analyzer] Revert incorrect LazyCoumpoundVal changes (PR #163461)

2025-10-14 Thread Marco Borgeaud via cfe-commits
https://github.com/marco-antognini-sonarsource created https://github.com/llvm/llvm-project/pull/163461 Reverts #115917 and its follow up #116840. Fixes #153782 and introduces regression tests. Reopens #114270. >From 1775b58ffd43828691ef4b6d2c0c8160f96d5caf Mon Sep 17 00:00:00 2001 From: Marco

[clang] [clang][PAC] Add ptrauth.h helpers for computing type discriminators (PR #163456)

2025-10-14 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/163456 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][NFC] Add test coverage for `Buffer` (PR #161909)

2025-10-14 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/161909 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream pointer subtraction handling (PR #163306)

2025-10-14 Thread Shawn K via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR + +typedef unsigned long size_type; + +size_type size(unsigned long *_start, unsigned long *_finish) { +

[clang] [lldb] [llvm] [ADT] Mark StringSwitch Cases with 6+ arguments as deprecated. NFC. (PR #163405)

2025-10-14 Thread Jakub Kuderski via cfe-commits
kuhar wrote: > That seems reasonable, can you document the reasoning in the commit message > please? done https://github.com/llvm/llvm-project/pull/163405 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/

[clang] [lldb] [llvm] [ADT] Mark StringSwitch Cases with 6+ arguments as deprecated. NFC. (PR #163405)

2025-10-14 Thread Sam Elliott via cfe-commits
lenary wrote: That seems reasonable, can you document the reasoning in the commit message please? https://github.com/llvm/llvm-project/pull/163405 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [clang][doc] Simplify Sampling-PGO use example (PR #162588)

2025-10-14 Thread Haohai Wen via cfe-commits
https://github.com/HaohaiWen edited https://github.com/llvm/llvm-project/pull/162588 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Emit debug info with original source location for tokens from macros … (PR #163190)

2025-10-14 Thread via cfe-commits
https://github.com/SergejSalnikov updated https://github.com/llvm/llvm-project/pull/163190 >From aabe21c59d9feca85cc08e22720452970b0700ab Mon Sep 17 00:00:00 2001 From: skill Date: Mon, 13 Oct 2025 14:12:09 +0200 Subject: [PATCH 1/9] Emit debug info with original source location for tokens fro

[clang] [WebKit checkers] Add support for ns_returns_autoreleased (PR #161236)

2025-10-14 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/161236 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Add support for the C `defer` TS (PR #162848)

2025-10-14 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: We talked about this PR a bit in my office hours yesterday and one thing which came up for feedback to WG14 is that this should be spelled `_Defer` and not `defer` if the committee is serious about the feature (which I believe they are). It's going into a TS, and so users h

[clang] [Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - Allow AVX512 conflict intrinsics to be used in constexpr (PR #163293)

2025-10-14 Thread NagaChaitanya Vellanki via cfe-commits
https://github.com/chaitanyav ready_for_review https://github.com/llvm/llvm-project/pull/163293 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Mac release fix (PR #163026)

2025-10-14 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/163026 >From b2f00eb013f5174b1ab5199bb7cc4cab6d5ed059 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 11 Oct 2025 17:39:12 -0700 Subject: [PATCH 1/6] [Darwin][Driver] Prefer linking with toolchain's libc++ ins

[clang] [Headers][X86] Allow MMX/SSE/AVX MOVMSK intrinsics to be used in constexpr (PR #161914)

2025-10-14 Thread Shawn K via cfe-commits
https://github.com/kimsh02 updated https://github.com/llvm/llvm-project/pull/161914 >From ccc7f4ed8640f8bc4726dac5d91e044bd8cc533b Mon Sep 17 00:00:00 2001 From: kimsh02 Date: Tue, 14 Oct 2025 11:07:32 -0700 Subject: [PATCH] Squash --- clang/include/clang/Basic/BuiltinsX86.td | 18 -

[clang] [ObjC][Preprocessor] Handle @import directive as a pp-directive (PR #157726)

2025-10-14 Thread via cfe-commits
@@ -947,6 +940,10 @@ bool Scanner::lexPPLine(const char *&First, const char *const End) { auto ScEx2 = make_scope_exit( [&]() { TheLexer.setParsingPreprocessorDirective(false); }); + // FIXME: Shoule we handle @import as a preprocessing directive? yr

[clang] [Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow SSE41 phminposuw intrinsic to be used in constexp (PR #163041)

2025-10-14 Thread Shawn K via cfe-commits
@@ -2899,6 +2899,45 @@ static bool interp__builtin_x86_insert_subvector(InterpState &S, CodePtr OpPC, return true; } +static bool interp__builtin_ia32_phminposuw(InterpState &S, CodePtr OpPC, +const CallExpr *Call) { + assert(Cal

[clang] [lldb] [llvm] [ADT] Mark StringSwitch Cases with 6+ arguments as deprecated. NFC. (PR #163405)

2025-10-14 Thread Sam Elliott via cfe-commits
lenary wrote: Can I ask why? And why 6+? Have particular issues been seen with these? https://github.com/llvm/llvm-project/pull/163405 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow AVX/AVX512 subvector extraction intrinsics to be used in constexpr #157712 (PR #162836)

2025-10-14 Thread via cfe-commits
@@ -2858,6 +2858,92 @@ static bool interp__builtin_elementwise_triop( return true; } +static bool interp__builtin_x86_extract_vector(InterpState &S, CodePtr OpPC, + const CallExpr *Call, +

[clang] 255db37 - [clangd] Retrieve documentation for class member instance from index (#153337)

2025-10-14 Thread via cfe-commits
Author: Nathan Ridge Date: 2025-10-06T13:30:02-04:00 New Revision: 255db37e778e0cb61417765f12a280605efc11b8 URL: https://github.com/llvm/llvm-project/commit/255db37e778e0cb61417765f12a280605efc11b8 DIFF: https://github.com/llvm/llvm-project/commit/255db37e778e0cb61417765f12a280605efc11b8.diff

[clang] [clang] Accept empty enum in MSVC compatible C (PR #159981)

2025-10-14 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,6 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wmicrosoft -verify -fms-extensions + +typedef enum tag1 { } A; // expected-warning {{empty enumeration types are a Microsoft extension}} +typedef enum tag2 { } B; // expected-warning {{empty enumeration types are a Microsoft

[clang-tools-extra] [clang-tidy] Fix broken fix-its with `bugprone-not-null-terminated-result` on Windows (PR #162874)

2025-10-14 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/162874 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits