[clang] [HLSL] Add support for SV_GroupIndex in SPIR-V (PR #130672)

2025-03-21 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts approved this pull request. https://github.com/llvm/llvm-project/pull/130672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] Multipart checker refactor 2: NullabilityChecker (PR #132250)

2025-03-21 Thread Donát Nagy via cfe-commits
@@ -112,25 +112,30 @@ class NullabilityChecker void printState(raw_ostream &Out, ProgramStateRef State, const char *NL, const char *Sep) const override; - enum CheckKind { -CK_NullPassedToNonnull, -CK_NullReturnedFromNonnull, -CK_NullableDerefe

[clang] [NFC][analyzer] Multipart checker refactor 2: NullabilityChecker (PR #132250)

2025-03-21 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat converted_to_draft https://github.com/llvm/llvm-project/pull/132250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Expose -m32 and -m64 options (PR #132409)

2025-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: Jean-Didier PAILLEUX (JDPailleux) Changes Exposes `-m32` and `-m64` options for Flang. These options can be used to build libraries or tools (e.g. OpenBlas). --- Full diff: https://github.com/llvm/llvm-project/pull/132409.diff 2

[clang] [flang] [flang] Expose -m32 and -m64 options (PR #132409)

2025-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jean-Didier PAILLEUX (JDPailleux) Changes Exposes `-m32` and `-m64` options for Flang. These options can be used to build libraries or tools (e.g. OpenBlas). --- Full diff: https://github.com/llvm/llvm-project/pull/132409.diff 2 Files

[clang] [NFC][analyzer] Multipart checker refactor 2: NullabilityChecker (PR #132250)

2025-03-21 Thread Donát Nagy via cfe-commits
NagyDonat wrote: I converted this PR to draft because I'll examine the ideas described in the inline comment https://github.com/llvm/llvm-project/pull/132250#discussion_r2007710175 . I'll probably tweak the framework based on those ideas, then revisit refactoring this checker. https://github

[clang] [flang] [flang] Expose -m32 and -m64 options (PR #132409)

2025-03-21 Thread Jean-Didier PAILLEUX via cfe-commits
https://github.com/JDPailleux created https://github.com/llvm/llvm-project/pull/132409 Exposes `-m32` and `-m64` options for Flang. These options can be used to build libraries or tools (e.g. OpenBlas). >From 404fae7c320f38f27aa666b92660341866cec0bd Mon Sep 17 00:00:00 2001 From: Jean-Didier

[clang] [clang][ExtractAPI] fix a couple crashes when used via libclang (PR #132297)

2025-03-21 Thread via cfe-commits
@@ -0,0 +1,33 @@ +// Test is line- and column-sensitive. Run lines are below + +template +class basic_vector { +public: +T x; +T y; +}; + +using my_vec = basic_vector; + +class MyClass { +my_vec myVec; +}; + +struct OuterStruct { +struct InnerStruct; +int oute

[clang] [llvm] [X86][AVX10.2] Remove YMM rounding from VMINMAXP[H,S,D] (PR #132405)

2025-03-21 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 09feaa9261448e72ce21394613e0a12f84c1b8d9 4da792e1397d893b4be997039d24cf933d9702b9 --e

[clang] [clang] Placement new error when modifying consts (PR #132460)

2025-03-21 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] [clang][ExtractAPI] fix a couple crashes when used via libclang (PR #132297)

2025-03-21 Thread Zixu Wang via cfe-commits
@@ -0,0 +1,33 @@ +// Test is line- and column-sensitive. Run lines are below + +template +class basic_vector { +public: +T x; +T y; +}; + +using my_vec = basic_vector; + +class MyClass { +my_vec myVec; +}; + +struct OuterStruct { +struct InnerStruct; +int oute

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-03-21 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,86 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify -fptrauth-intrinsics %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fsyntax-only -verify -fptrauth-intrinsics %s + +#if __has_feature(ptrauth_qualifier) +#warning __ptrauth qualifier enabled! +

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-03-21 Thread Sumit Agarwal via cfe-commits
https://github.com/sumitsays edited https://github.com/llvm/llvm-project/pull/131237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] fix a couple crashes when used via libclang (PR #132297)

2025-03-21 Thread via cfe-commits
@@ -175,28 +175,30 @@ class ExtractAPIVisitorBase : public RecursiveASTVisitor { SmallVector getBases(const CXXRecordDecl *Decl) { // FIXME: store AccessSpecifier given by inheritance SmallVector Bases; -for (const auto &BaseSpecifier : Decl->bases()) { - //

[clang] [Clang][NFC] Use MarkUsedTemplateParameters in building alias CTAD guides (PR #132369)

2025-03-21 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/132369 >From ab0cca1c85dcf08ba78e4f916325c86f5a425b8f Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 21 Mar 2025 18:18:39 +0800 Subject: [PATCH 1/2] [Clang][NFC] Use MarkUsedTemplateParameters It turns out tha

[clang] [llvm] [X86][AVX10.2] Remove YMM rounding from VCVT[,T]PS2I[,U]BS (PR #132426)

2025-03-21 Thread Evgenii Kudriashov via cfe-commits
https://github.com/e-kud edited https://github.com/llvm/llvm-project/pull/132426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] fix a couple crashes when used via libclang (PR #132297)

2025-03-21 Thread via cfe-commits
https://github.com/QuietMisdreavus updated https://github.com/llvm/llvm-project/pull/132297 >From d83501ff207af0b7576e4297132fd8e702bae2c1 Mon Sep 17 00:00:00 2001 From: Vera Mitchell Date: Thu, 20 Mar 2025 10:22:12 -0600 Subject: [PATCH 1/3] collect template argument locs ahead of time to nul

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-21 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,44 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 + +// RUN: %clang_cc1 -O1 -triple spirv-pc-vulkan-compute %s -emit-llvm -o - | FileCheck %s + +typedef float float2 __attribute__((ext_vector_type(2))); +typedef

[clang-tools-extra] [clang-doc][NFC] fix description typo (PR #132310)

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

[clang-tools-extra] [clang-doc][NFC] fix description typo (PR #132310)

2025-03-21 Thread Paul Kirth via cfe-commits
ilovepi wrote: Thanks for the PR. https://github.com/llvm/llvm-project/pull/132310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc][NFC] fix description typo (PR #132310)

2025-03-21 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. https://github.com/llvm/llvm-project/pull/132310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc][NFC] fix description typo (PR #132310)

2025-03-21 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/132310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 98dc8bb - [clang-doc][NFC] fix description typo (#132310)

2025-03-21 Thread via cfe-commits
Author: Mohamed Emad Date: 2025-03-21T16:08:14-07:00 New Revision: 98dc8bb892e984bc5dbd0f30f4c3a2876791c518 URL: https://github.com/llvm/llvm-project/commit/98dc8bb892e984bc5dbd0f30f4c3a2876791c518 DIFF: https://github.com/llvm/llvm-project/commit/98dc8bb892e984bc5dbd0f30f4c3a2876791c518.diff

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-03-21 Thread via cfe-commits
https://github.com/choikwa updated https://github.com/llvm/llvm-project/pull/129347 >From 7c2e0cb623ddf1ecbb58e46ef2f69ba06790c22d Mon Sep 17 00:00:00 2001 From: Kevin Choi Date: Fri, 28 Feb 2025 16:52:03 -0600 Subject: [PATCH] [AMDGPU][clang] provide device implementation for __builtin_logb a

[clang] [Clang] [NFC] Introduce a helper for emitting compatibility diagnostics (PR #132348)

2025-03-21 Thread via cfe-commits
@@ -1518,6 +1518,50 @@ static void verifyDiagnosticWording(const Record &Diag) { // runs into odd situations like [[clang::warn_unused_result]], // #pragma clang, or --unwindlib=libgcc. } + +/// ClangDiagsCompatIDsEmitter - Emit a set of 'compatibility diagnostic ids' +///

[clang] [CIR] Add binary operators (PR #132420)

2025-03-21 Thread Erich Keane via cfe-commits
@@ -26,6 +26,53 @@ using namespace clang::CIRGen; namespace { +struct BinOpInfo { + mlir::Value lhs; + mlir::Value rhs; + SourceRange loc; + QualType fullType; // Type of operands and result + QualType compType; // Type used for computations. Elem

[clang] [Clang] [NFC] Introduce a helper for emitting compatibility diagnostics (PR #132348)

2025-03-21 Thread via cfe-commits
@@ -769,6 +770,51 @@ StringRef DiagnosticIDs::getNearestOption(diag::Flavor Flavor, return Best; } +unsigned DiagnosticIDs::getCompatDiagId(const LangOptions &LangOpts, +unsigned CompatDiagId) { + struct CompatDiag { +unsigned St

[clang] [clang][HeuristicResolver] Default argument heuristic for template parameters (PR #132465)

2025-03-21 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/132465 Fixes https://github.com/clangd/clangd/discussions/1056 >From 2855815b91dd924aa56e98ef00f228fdeac9d81d Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 13 Mar 2025 01:23:03 -0400 Subject: [PATCH] [

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-03-21 Thread Trevor Gross via cfe-commits
@@ -548,11 +543,28 @@ SystemZTargetLowering::SystemZTargetLowering(const TargetMachine &TM, } // Handle floating-point types. + if (!useSoftFloat()) { +// Promote all f16 operations to float, with some exceptions below. +for (unsigned Opc = 0; Opc < ISD::BUILTIN_

[clang] [clang][HeuristicResolver] Default argument heuristic for template parameters (PR #132465)

2025-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nathan Ridge (HighCommander4) Changes Fixes https://github.com/clangd/clangd/discussions/1056 --- Full diff: https://github.com/llvm/llvm-project/pull/132465.diff 2 Files Affected: - (modified) clang/lib/Sema/HeuristicResolver.cpp (+15)

[clang] [CIR] Emit allocas into the proper lexical scope (PR #132468)

2025-03-21 Thread Andy Kaylor via cfe-commits
andykaylor wrote: CC: @mmha https://github.com/llvm/llvm-project/pull/132468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Emit allocas into the proper lexical scope (PR #132468)

2025-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes Alloca operations were being emitted into the entry block of the current function unconditionally, even if the variable they represented was declared in a different scope. This change upstreams the code fo

[clang] [clang][ExtractAPI] fix a couple crashes when used via libclang (PR #132297)

2025-03-21 Thread via cfe-commits
@@ -0,0 +1,33 @@ +// Test is line- and column-sensitive. Run lines are below + +template +class basic_vector { +public: +T x; +T y; +}; + +using my_vec = basic_vector; + +class MyClass { +my_vec myVec; +}; + +struct OuterStruct { QuietMisdreavus wrote

[clang] [clang-tools-extra] [lldb] [llvm] [clang-doc] Add regression test for test comments in macros (PR #132360)

2025-03-21 Thread via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --format=md --doxygen --output=%t --executor=standalone %s +// RUN: clang-doc --format=html --doxygen --output=%t --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.md --check-prefix=MD

[clang] [HLSL][NFC] Refactor HLSLExternalSemaSource (PR #131032)

2025-03-21 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/131032 >From 7ebfc826ca27c71ef80f4a1b38b2d3a2e155b777 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 12 Mar 2025 14:09:24 -0700 Subject: [PATCH 1/4] [HLSL][NFC] Refactoring HLSLExternalSemaSource Moving builder

[clang] [llvm] Hlsl asint16 intrinsic (PR #131900)

2025-03-21 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/131900 >From 1e34c5428964733f4ae0e924d373b9fda780f370 Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Tue, 18 Mar 2025 11:30:15 -0700 Subject: [PATCH 01/18] Add codegen tests, Sema tests, SPIR-V backend t

[clang] [llvm] [RISCV] SiFive CLIC Support (PR #132481)

2025-03-21 Thread Sam Elliott via cfe-commits
lenary wrote: > Is there a reason why these aren't lowercase like the rest? They match the existing names documented in https://starfivetech.com/uploads/sifive-interrupt-cookbook-v1p2.pdf - we could check them in clang case-insensitively, though. https://github.com/llvm/llvm-project/pull/1324

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-21 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl deleted https://github.com/llvm/llvm-project/pull/132288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Allow setting a base directory for hosted pages (PR #132482)

2025-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Paul Kirth (ilovepi) Changes Currently, when we set URLs from JS, we set them only using the protocol and host locations. This works fine when docs are served from the base directory of the site, but if you want to nest it under

[clang-tools-extra] [clang-doc] Allow setting a base directory for hosted pages (PR #132482)

2025-03-21 Thread Paul Kirth via cfe-commits
ilovepi wrote: * **#132482** https://app.graphite.dev/github/pr/llvm/llvm-project/132482?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/1324

[clang-tools-extra] [clang-doc] Allow setting a base directory for hosted pages (PR #132482)

2025-03-21 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi ready_for_review https://github.com/llvm/llvm-project/pull/132482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [mlir] [mlir] Fix typo of tests (NFC) (PR #132394)

2025-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-mlir Author: Austin (Zhenhang1213) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/132394.diff 6 Files Affected: - (modified) clang/include/clang/Driver/Options.td (+1-1) - (modified) clang/lib/Driver/Too

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-21 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,44 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 + +// RUN: %clang_cc1 -O1 -triple spirv-pc-vulkan-compute %s -emit-llvm -o - | FileCheck %s + +typedef float float2 __attribute__((ext_vector_type(2))); +typedef

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-21 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 %s -triple spirv-pc-vulkan-compute -verify + +typedef float float2 __attribute__((ext_vector_type(2))); + +float2 test_no_second_arg(float2 p0) { + return __builtin_spirv_smoothstep(p0); + // expected-error@-1 {{too few arguments to function

[clang] [llvm] [RISCV] SiFive CLIC Support (PR #132481)

2025-03-21 Thread Sam Elliott via cfe-commits
lenary wrote: For Info, the last time this was proposed was in 2020: https://reviews.llvm.org/D79521 - at that time, no vendor extensions had been accepted upstream, and there was not yet a policy for upstream supporting vendor extensions. https://github.com/llvm/llvm-project/pull/132481

[clang-tools-extra] [clang-doc] Allow setting a base directory for hosted pages (PR #132482)

2025-03-21 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/132482 >From 1a9d8768e61e4e69560cff228eacee81e61d9764 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 21 Mar 2025 22:29:14 + Subject: [PATCH] [clang-doc] Allow setting a base directory for hosted pages Curren

[clang] f51e5f3 - [CIR] Upstream initial for-loop support (#132266)

2025-03-21 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-03-21T09:13:13-07:00 New Revision: f51e5f3f651af8a83d429fde54bf24ccb03fa420 URL: https://github.com/llvm/llvm-project/commit/f51e5f3f651af8a83d429fde54bf24ccb03fa420 DIFF: https://github.com/llvm/llvm-project/commit/f51e5f3f651af8a83d429fde54bf24ccb03fa420.diff L

[clang] [clang][scan-build] Treat --use-cc and --use-c++ as shell commands (PR #131932)

2025-03-21 Thread Balázs Benics via cfe-commits
balazs-benics-sonarsource wrote: Looks good as it is right now. Thanks for putting the effort into this. I've invited the rest of the folks probably interested in this to get a second opinion. https://github.com/llvm/llvm-project/pull/131932 ___ cfe-c

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-21 Thread Sergei Barannikov via cfe-commits
https://github.com/s-barannikov approved this pull request. https://github.com/llvm/llvm-project/pull/132252 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-21 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I tried to address some of the feedback with some changes, please let me know if you'd like to see additional information. https://github.com/llvm/llvm-project/pull/132232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [llvm] [X86][AVX10.2] Remove YMM rounding from VCVT[,T]PS2I[,U]BS (PR #132426)

2025-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Phoebe Wang (phoebewang) Changes Ref: https://cdrdv2.intel.com/v1/dl/getContent/784343 --- Patch is 125.69 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/132426.diff 15 Files Affected:

[clang] [llvm] [X86][AVX10.2] Remove YMM rounding from VCVT[,T]PS2I[,U]BS (PR #132426)

2025-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Phoebe Wang (phoebewang) Changes Ref: https://cdrdv2.intel.com/v1/dl/getContent/784343 --- Patch is 125.69 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/132426.diff 15 Files Affected: - (

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-21 Thread Jonathan Thackray via cfe-commits
jthackray wrote: > I'd say you can merge it once CI is green. Thanks @jhuber6. CI is green. clang-format isn't, but running clang-format breaks some of the AArch64 tests. I'll wait another few hours, just in case there are more comments, and merge later today if not. https://github.com/llvm

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-21 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/132232 >From 5008e3cff11bb019e22148926f0088fbb8fc530f Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 20 Mar 2025 11:00:05 -0400 Subject: [PATCH 1/3] [Docs] Document freestanding requirements This adds so

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-21 Thread Joseph Huber via cfe-commits
@@ -1076,13 +1076,11 @@ Language and Target-Independent Features Freestanding Builds --- Passing the ``-ffreestanding`` flag causes Clang to build for a freestanding -(rather than a hosted) environment. The ``__STDC_HOSTED__`` predefined macro -will expand to ``

[clang] [clang][analyzer] Ignore unnamed bitfields in UninitializedObject (PR #132427)

2025-03-21 Thread Abhinav Kumar via cfe-commits
https://github.com/kr-2003 edited https://github.com/llvm/llvm-project/pull/132427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Format test files (PR #132428)

2025-03-21 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/132428 Many of the test files had an inconsistent formatting. This patch ran clang-format over them using the project's .clang-format file, with column limit = 0, to prevent test directives from being split over multipl

[clang-tools-extra] [clang-doc] Format test files (PR #132428)

2025-03-21 Thread Paul Kirth via cfe-commits
ilovepi wrote: * **#132428** https://app.graphite.dev/github/pr/llvm/llvm-project/132428?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/1324

[clang] [clang][scan-build] Treat --use-cc and --use-c++ as shell commands (PR #131932)

2025-03-21 Thread Balázs Benics via cfe-commits
https://github.com/balazs-benics-sonarsource edited https://github.com/llvm/llvm-project/pull/131932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Hlsl asuint16 function (PR #132315)

2025-03-21 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt commented: LGTM but I'll let Farzon approve https://github.com/llvm/llvm-project/pull/132315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Expose -m32 and -m64 options (PR #132409)

2025-03-21 Thread Kiran Chandramohan via cfe-commits
@@ -4671,14 +4671,14 @@ def EB : Flag<["-"], "EB">, Alias; def m16 : Flag<["-"], "m16">, Group, Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption, DXCOption]>; def m32 : Flag<["-"], "m32">, Group, Flags<[NoXarchOption]>, - Visibility<[ClangOption, CLOption, DXCOption

[clang] [flang] [llvm] [clang] Add isOffloadingTarget function to LangOpts (PR #126956)

2025-03-21 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Seems reasonable so long as we know that `SPIR-V` is always a GPU. I'll defer to SPIR people. https://github.com/llvm/llvm-project/pull/126956 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [CIR] Add binary operators (PR #132420)

2025-03-21 Thread Andy Kaylor via cfe-commits
@@ -143,6 +147,114 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return createCast(loc, cir::CastKind::bitcast, src, newTy); } + mlir::Value createBinop(mlir::Value lhs, cir::BinOpKind kind, andykaylor wrote: ```suggestion mlir::Value createBi

[clang] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

2025-03-21 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/130473 >From 909de4a22dcda164b8fcb539e0907a77f99b3b00 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 9 Mar 2025 01:36:25 -0500 Subject: [PATCH 1/6] Change the parameter type of resolveTypeToTagDecl() to

[clang] [llvm] [RISCV] SiFive CLIC Support (PR #132481)

2025-03-21 Thread Sam Elliott via cfe-commits
https://github.com/lenary created https://github.com/llvm/llvm-project/pull/132481 This Change adds support for two SiFive vendor attributes in clang: - "SiFive-CLIC-preemptible" - "SiFive-CLIC-stack-swap" These can be given together, and can be combined with "machine", but cannot be combined w

[clang] [llvm] [RISCV] SiFive CLIC Support (PR #132481)

2025-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Sam Elliott (lenary) Changes This Change adds support for two SiFive vendor attributes in clang: - "SiFive-CLIC-preemptible" - "SiFive-CLIC-stack-swap" These can be given together, and can be combined with "machine", but cannot be combined wi

[clang] [CIR] Emit allocas into the proper lexical scope (PR #132468)

2025-03-21 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/132468 Alloca operations were being emitted into the entry block of the current function unconditionally, even if the variable they represented was declared in a different scope. This change upstreams the code for ha

[clang] [llvm] Revert "[X86][AVX10.2] Support YMM rounding new instructions (#101825)" (PR #132362)

2025-03-21 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/132362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

2025-03-21 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Fixed now. Resubmitting for review. https://github.com/llvm/llvm-project/pull/130473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] NFCI: Mutate `HeaderSearchOptions` earlier (PR #130823)

2025-03-21 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. I think this looks good now. Also nice in general to not mess with options after argument parsing. https://github.com/llvm/llvm-project/pull/130823 ___ cfe-commits mailing list cfe-commits@lists

[clang] [NFC] [ASTMatchers] Share code of `forEachArgumentWithParamType` with UnsafeBufferUsage (PR #132387)

2025-03-21 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: Hi @ilya-biryukov, thank you for continuing to improve this! I'm currently dealing with downstream conflicts with your previous patch. Please do not merge this PR this week, otherwise it may slow down our CI. Thanks! https://github.com/llvm/llvm-project/pull/132387 _

[clang] [clang] NFCI: Mutate `HeaderSearchOptions` earlier (PR #130823)

2025-03-21 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/130823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AVX10.2] Remove YMM rounding from VCVTTP.*QS (PR #132414)

2025-03-21 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 09feaa9261448e72ce21394613e0a12f84c1b8d9 096e0b112724176f3d4893657580588a021d2224 --e

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-21 Thread Kaitlin Peng via cfe-commits
@@ -101,6 +101,44 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned BuiltinID, TheCall->setType(RetTy); break; } + case SPIRV::BI__builtin_spirv_smoothstep: { +if (SemaRef.checkArgCount(TheCall, 3)) + return true; + +ExprResult A = TheCall->getA

[clang] [CIR] Add binary operators (PR #132420)

2025-03-21 Thread Morris Hafner via cfe-commits
https://github.com/mmha created https://github.com/llvm/llvm-project/pull/132420 This patch adds upstreams support for BinOp and BinOverflowOp including lvalue assignments and rudimentary support for pointer arithmetic. Note that this does not include ternary ops, ShiftOp and SelectOp which are

[clang] [CIR] Add binary operators (PR #132420)

2025-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir @llvm/pr-subscribers-clang Author: Morris Hafner (mmha) Changes This patch adds upstreams support for BinOp and BinOverflowOp including lvalue assignments and rudimentary support for pointer arithmetic. Note that this does not include ternary o

[clang] [CIR] Add binary operators (PR #132420)

2025-03-21 Thread Morris Hafner via cfe-commits
mmha wrote: @erichkeane @dkolsen-pgi @andykaylor https://github.com/llvm/llvm-project/pull/132420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Hlsl asuint16 function (PR #132315)

2025-03-21 Thread Ashley Coleman via cfe-commits
@@ -0,0 +1,52 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.2-library %s -fnative-half-type -verify + +uint16_t test_asuint16_less_argument() +{ +return asuint16(); + // expected-error@-1 {{no matching function for call to 'asuint16'}} + // ex

[clang] [llvm] Hlsl asuint16 function (PR #132315)

2025-03-21 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt edited https://github.com/llvm/llvm-project/pull/132315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-03-21 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/132401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Use MarkUsedTemplateParameters in building alias CTAD guides (PR #132369)

2025-03-21 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/132369 It turns out that TemplateParamsReferencedInTemplateArgumentList() and MarkUsedTemplateParameters() have the similar goal, so let's drop the hand-written ASTVisitor. >From ab0cca1c85dcf08ba78e4f916325c86f5a425

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-21 Thread Sergei Barannikov via cfe-commits
@@ -0,0 +1,105 @@ +//===-- CGBuiltin.h - Emit LLVM Code for builtins -===// +// +// 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] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-21 Thread Nikita Popov via cfe-commits
nikic wrote: > clang/lib/CodeGen/CGBuiltin.cpp is over 1MB long (>23k LoC), and can take > minutes to recompile (depending on compiler and host system) when modified, > and 5 seconds for clangd to update for every edit. Splitting this file was > discussed in this thread: It looks like while t

[clang] 7606f67 - [clang] NFCI: Mutate `HeaderSearchOptions` earlier (#130823)

2025-03-21 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-03-21T13:52:12-07:00 New Revision: 7606f6773cb5abe701b615b0bec54e68758955d7 URL: https://github.com/llvm/llvm-project/commit/7606f6773cb5abe701b615b0bec54e68758955d7 DIFF: https://github.com/llvm/llvm-project/commit/7606f6773cb5abe701b615b0bec54e68758955d7.diff L

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-21 Thread Nikita Popov via cfe-commits
nikic wrote: For example, the SPIR builtins file has barely more than 50 lines of code but clocks in at 30M instructions (the *whole* of CGBuiltins.cpp was 120M previously). https://github.com/llvm/llvm-project/pull/132252 ___ cfe-commits mailing lis

[clang] [llvm] [X86][AVX10.2] Remove YMM rounding from VCVTTP.*QS (PR #132414)

2025-03-21 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM with the clang-format warning fix on the header https://github.com/llvm/llvm-project/pull/132414 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-03-21 Thread Ashley Coleman via cfe-commits
@@ -0,0 +1,8 @@ +; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-compute %s | FileCheck %s + +define noundef float @dot2add_simple(<2 x half> noundef %a, <2 x half> noundef %b, float %c) { +entry: +; CHECK: call float @dx.op.dot2AddHalf(i32 162, float %c, half %0, h

[clang] [clang][CodeGen][AVR] Fix a crash in AVRABIInfo (PR #131976)

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

[clang] [clang-format] add option to control bin-packing keyworded parameters (PR #131605)

2025-03-21 Thread via cfe-commits
@@ -4032,6 +4032,38 @@ the configuration (without a prefix: ``Auto``). For example: BOOST_FOREACH. +.. _FunctionDeclarationsWithKeywords: + +**FunctionDeclarationsWithKeywords** (``List of FunctionDeclarationWithKeywordes``) :versionbadge:`clang-format 21` :ref:`¶ ` -

[clang] [CIR] Add binary operators (PR #132420)

2025-03-21 Thread Erich Keane via cfe-commits
@@ -143,6 +147,114 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return createCast(loc, cir::CastKind::bitcast, src, newTy); } + mlir::Value createBinop(mlir::Value lhs, cir::BinOpKind kind, + const llvm::APInt &rhs) { +return create(

[clang] 1cbcaa4 - [clang][dataflow] Add matcher for pointer-like types to be cached (#132314)

2025-03-21 Thread via cfe-commits
Author: Florian Mayer Date: 2025-03-21T13:27:11-04:00 New Revision: 1cbcaa458020d7fa2b9b5d91db609f5a81d59346 URL: https://github.com/llvm/llvm-project/commit/1cbcaa458020d7fa2b9b5d91db609f5a81d59346 DIFF: https://github.com/llvm/llvm-project/commit/1cbcaa458020d7fa2b9b5d91db609f5a81d59346.diff

[clang] [clang][dataflow] Add matcher for pointer-like types to be cached (PR #132314)

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

[clang] [CIR] Add binary operators (PR #132420)

2025-03-21 Thread Erich Keane via cfe-commits
@@ -143,6 +147,114 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return createCast(loc, cir::CastKind::bitcast, src, newTy); } + mlir::Value createBinop(mlir::Value lhs, cir::BinOpKind kind, + const llvm::APInt &rhs) { +return create(

[clang] [CIR] Add binary operators (PR #132420)

2025-03-21 Thread Erich Keane via cfe-commits
@@ -143,6 +147,114 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return createCast(loc, cir::CastKind::bitcast, src, newTy); } + mlir::Value createBinop(mlir::Value lhs, cir::BinOpKind kind, + const llvm::APInt &rhs) { +return create(

[clang] [CIR] Add binary operators (PR #132420)

2025-03-21 Thread Erich Keane via cfe-commits
@@ -826,6 +826,129 @@ def ForOp : CIR_Op<"for", [LoopOpInterface, NoRegionArguments]> { }]; } +//===--===// +// BinOp +//===--===// + +//

[clang] [clang-tools-extra] [lldb] [llvm] Add test to clang-doc, it can test comments in macro. Original issue is #59819. (PR #132360)

2025-03-21 Thread via cfe-commits
ZhongUncle wrote: > I'll take a deeper look at your PR once it only has clang-doc related changes. This is my problem, sorry, I should put the `build` in external directory. I `cmake` a `build` directory in `llvm-project and I use Mac build it in remote PC. It will create or change some files.

[clang] [clang-tools-extra] [lldb] [llvm] [clang-doc] Add regression test for test comments in macros (PR #132360)

2025-03-21 Thread via cfe-commits
https://github.com/ZhongUncle edited https://github.com/llvm/llvm-project/pull/132360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisync (Sync Delay) extension (PR #132184)

2025-03-21 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/132184 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-03-21 Thread via cfe-commits
EugeneZelenko wrote: Please add entry in Release Notes. https://github.com/llvm/llvm-project/pull/132242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-21 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > But, what I would like is that we somehow make it trivial for users to get an > implementation of the required functionality without requiring an > externally-provided libc. Some way for users to trivially build and link > against implementations of those functions for th

<    1   2   3   4   5   >