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

2025-04-04 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: > This makes a lot of sense to me, just wondering why you chose > `clang/lib/CodeGen/BuiltinTargets/` rather than > `clang/lib/CodeGen/TargetBuiltins/`? The former shounds like it contains the > list of all builtin targets, rather than the codegen for target-specific > builtins.

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-04-04 Thread Oliver Hunt via cfe-commits
@@ -10601,19 +10608,28 @@ static bool AnalyzeBitFieldAssignment(Sema &S, FieldDecl *Bitfield, Expr *Init, // on Windows where unfixed enums always use an underlying type of 'int'. unsigned DiagID = 0; if (SignedEnum && !SignedBitfield) { -DiagID = dia

[clang] [clang] Implement CWG2803 and CWG2958 (PR #132779)

2025-04-04 Thread Vlad Serebrennikov via cfe-commits
@@ -6,6 +6,89 @@ // RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify=expected,since-cxx11,cxx11-23,since-cxx20,since-cxx23 %s // RUN: %clang_cc1 -std=c++2c -pedantic-errors -verify=expected,since-cxx11,since-cxx20,since-cxx23,since-cxx26 %s +namespace cwg2803 { // cwg2803

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-04-04 Thread Martin Uecker via cfe-commits
@@ -450,6 +453,116 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const Attr *Attr1, const Attr *Attr2) { + // Two attributes are structurally equivalent if they are

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

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

[clang] [WIP][AArch64][SVE] Big endian support SVE (PR #132772)

2025-04-04 Thread David Green via cfe-commits
davemgreen wrote: I didn't believe that the backend supports it properly yet (or was tested at-all). I'm not sure of the details on why that was deemed OK not to support it. @sdesmalen-arm and @paulwalker-arm might know more. https://github.com/llvm/llvm-project/pull/132772 ___

[clang] [NFC][FMV][AArch64] Tidy up codegen tests. (PR #132273)

2025-04-04 Thread Tomas Matheson via cfe-commits
@@ -1,1145 +0,0 @@ -// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals --include-generated-funcs --global-value-regex ".*" -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -emit-llvm -

[clang] [WebKit Checkers] Recognize Objective-C and CF pointer conversion functions. (PR #132784)

2025-04-04 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/132784 Recognize dynamic_objc_cast, checked_objc_cast, dynamic_cf_cast, and checked_cf_cast. >From aed6967708809b964c4969ec4e6477dade61132d Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 24 Mar 2025 10:13:16 -0

[clang] [clang][diagnostics] Update note_constexpr_invalid_cast to use enum_select and adjust its uses (PR #130868)

2025-04-04 Thread Ayokunle Amodu via cfe-commits
https://github.com/ayokunle321 edited https://github.com/llvm/llvm-project/pull/130868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-04-04 Thread JJ Marr via cfe-commits
https://github.com/jj-marr updated https://github.com/llvm/llvm-project/pull/130458 >From 0cba377eb8693657b7688cd1feb1cc9c5734f307 Mon Sep 17 00:00:00 2001 From: JJ Marr Date: Sat, 8 Mar 2025 22:00:45 -0500 Subject: [PATCH] Explain which assertion failed during consteval --- .../clang/Basic/D

[clang] [llvm] [fatlto] Use the ThinLTO default pipeline for FatLTO (PR #134434)

2025-04-04 Thread Tom Stellard via cfe-commits
https://github.com/tstellar milestoned https://github.com/llvm/llvm-project/pull/134434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] Reland [Coverage] Fix region termination for GNU statement expressions (PR #132222)

2025-04-04 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/13 >From fa652581d03c962b61e7a350e0e9da0874e67109 Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Thu, 20 Mar 2025 10:01:42 -0400 Subject: [PATCH] Reland [Coverage] Fix region termination for GNU statement exp

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

2025-04-04 Thread Ulrich Weigand via cfe-commits
uweigand wrote: > Moved the comment "Promoting the result to i64...so use the default > expansion" that was present in SystemZISelLowering.cpp into this method, but > don't quite understand it fully. Is this talking about promoting to signed > i64? This is about whether we can (and should) im

[clang] [llvm] [MIPS] Add MIPS i6400 and i6500 processors (PR #130587)

2025-04-04 Thread Mallikarjuna Gouda via cfe-commits
mgoudar wrote: > Lets wait another day or two, since someone may have additional comments. > Thanks @mgoudar! sure. thank you. https://github.com/llvm/llvm-project/pull/130587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang-tools-extra] 3923a6b - [clang-doc][NFC] Remove unnecessary directory cleanup (#132101)

2025-04-04 Thread via cfe-commits
Author: Paul Kirth Date: 2025-03-20T14:08:46-07:00 New Revision: 3923a6b09c4e104391e2dd12b984190066fed6ec URL: https://github.com/llvm/llvm-project/commit/3923a6b09c4e104391e2dd12b984190066fed6ec DIFF: https://github.com/llvm/llvm-project/commit/3923a6b09c4e104391e2dd12b984190066fed6ec.diff LO

[clang] c22586a - [PowerPC] Update altivec.h to use __inline__ for c89 compatibility (#134430)

2025-04-04 Thread via cfe-commits
Author: Lei Huang Date: 2025-04-04T15:19:36-04:00 New Revision: c22586a9d18dd0f066e5660102f7de15fd239e2c URL: https://github.com/llvm/llvm-project/commit/c22586a9d18dd0f066e5660102f7de15fd239e2c DIFF: https://github.com/llvm/llvm-project/commit/c22586a9d18dd0f066e5660102f7de15fd239e2c.diff LOG

[clang] [Clang] add emit -Wignored-base-class-qualifiers diagnostic for cv-qualified base classes (PR #132116)

2025-04-04 Thread Aaron Ballman via cfe-commits
@@ -298,6 +298,8 @@ Improvements to Clang's diagnostics - Improve the ``-Wundefined-func-template`` warning when a function template is not instantiated due to being unreachable in modules. +- Clang now emits a ``-Wignored-base-class-qualifiers`` diagnostic when a base clas

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

2025-04-04 Thread Björn Schäpers via cfe-commits
@@ -1067,6 +1076,8 @@ template <> struct MappingTraits { IO.mapOptional("InsertNewlineAtEOF", Style.InsertNewlineAtEOF); IO.mapOptional("InsertTrailingCommas", Style.InsertTrailingCommas); IO.mapOptional("IntegerLiteralSeparator", Style.IntegerLiteralSeparator); +

[clang] [clang-tools-extra] [clang] improve class type sugar preservation in pointers to members (PR #130537)

2025-04-04 Thread Matheus Izvekov via cfe-commits
@@ -1355,7 +1355,7 @@ class BlockPointerTypeLoc : public PointerLikeTypeLochttps://github.com/llvm/llvm-project/pull/130537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

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

2025-04-04 Thread Eugene Shalygin via cfe-commits
https://github.com/zeule updated https://github.com/llvm/llvm-project/pull/131605 >From b6d53143b5f3fd6db9f6b76df9dd49425d9038a8 Mon Sep 17 00:00:00 2001 From: Eugene Shalygin Date: Mon, 17 Mar 2025 11:23:35 +0100 Subject: [PATCH] [clang-format] add option to bin-pack keyworded parameters The

[clang] [llvm] [PowerPC] Enable indiviual crbits tracking at -O2 (PR #133617)

2025-04-04 Thread Henry Jiang via cfe-commits
https://github.com/mustartt edited https://github.com/llvm/llvm-project/pull/133617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fixed clang frontend crash with friend class declaration and overload == (PR #133878)

2025-04-04 Thread Ankur Ahir via cfe-commits
https://github.com/Ankur-0429 updated https://github.com/llvm/llvm-project/pull/133878 >From 3a3dea21957b70dfedc4eab47be0c1717ff0a229 Mon Sep 17 00:00:00 2001 From: Ankur Ahir Date: Tue, 1 Apr 2025 00:51:11 -0700 Subject: [PATCH] fixed clang frontend crash with friend class declaration and ove

[clang-tools-extra] [Clang-tidy][NFC] Remove dead code detected by code sanitizer. (PR #134385)

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

[clang-tools-extra] ebb0e6c - [NFC] Remove dead code detected by code sanitizer. (#134385)

2025-04-04 Thread via cfe-commits
Author: Zahira Ammarguellat Date: 2025-04-04T15:21:47-04:00 New Revision: ebb0e6cb2555186fa0417ecb54925aa659346771 URL: https://github.com/llvm/llvm-project/commit/ebb0e6cb2555186fa0417ecb54925aa659346771 DIFF: https://github.com/llvm/llvm-project/commit/ebb0e6cb2555186fa0417ecb54925aa659346771

[clang] [alpha.webkit.RawPtrRefMemberChecker] The checker doesn't warn Objective-C types in ivars. (PR #132833)

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

[clang] [HLSL][RootSignature] Define and integrate `HLSLRootSignatureAttr` (PR #134124)

2025-04-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `amdgpu-offload-rhel-9-cmake-build-only` running on `rocm-docker-rhel-9` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/205/builds/5405 Here is the releva

[clang-tools-extra] [Clang-tidy][NFC] Remove dead code detected by code sanitizer. (PR #134385)

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

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-04-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/132919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Always verify LLVM IR inputs (PR #134396)

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

[libclc] [libclc] Move rootn to the CLC library; optimize (PR #133735)

2025-04-04 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/133735 The function was already nominally in the CLC namespace; this commit just moves it over. This commit also vectorizes the builtin to avoid scalarization. >From 67b778704e01e1e783cdf635a5fd4ca359f71d22 Mon S

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-04-04 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: > (LMK if I've got that wrong!) Given that, how is the C11 change a breaking > change? It seems like the C99 rule was just bogus, and we should forget it > ever existed? IIUC, the "breaking change" is that in C99 a pointer value to a temporary array element never become

[clang] [clang][ExtractAPI] emit correct spelling for type aliases (PR #134007)

2025-04-04 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,56 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -extract-api --pretty-sgf --emit-sgf-symbol-labels-for-testing \ +// RUN: --product-name=TypeAlias -triple arm64-apple-macosx -x c++-header %s -o %t/type-alias.symbols.json -verify + +// RUN: FileCheck %s --input-file %t/

[clang] [llvm] [fatlto] Use the ThinLTO default pipeline for FatLTO (PR #134434)

2025-04-04 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/134434 >From 6c3ea0b212b3bdafcbec0fda9af56f00d8b1451b Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 4 Apr 2025 11:49:02 -0700 Subject: [PATCH] [fatlto] Use the ThinLTO default pipeline for FatLTO When coroutine

[clang-tools-extra] [clang-tidy] Improve `bugprone-capturing-this-in-member-variable` check: add support of `bind` functions. (PR #132635)

2025-04-04 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/132635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] emit correct spelling for type aliases (PR #134007)

2025-04-04 Thread via cfe-commits
https://github.com/QuietMisdreavus approved this pull request. Thanks so much for doing this! https://github.com/llvm/llvm-project/pull/134007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [clang] Accept recursive non-dependent calls to functions with deduced return type (PR #75456)

2025-04-04 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Looks like this is linked to the following regression: https://github.com/llvm/llvm-project/issues/133688 https://github.com/llvm/llvm-project/pull/75456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [llvm] [fatlto] Use the ThinLTO default pipeline for FatLTO (PR #134434)

2025-04-04 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/134434 >From a013418d71fc18387ec70c4ab64f611334d3a531 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 4 Apr 2025 11:49:02 -0700 Subject: [PATCH] [fatlto] Use the ThinLTO default pipeline for FatLTO When coroutine

[clang] [clang][AST] Fix end location of DeclarationNameInfo on instantiated methods (PR #92654)

2025-04-04 Thread Balazs Benics via cfe-commits
steakhal wrote: > @alejandro-alvarez-sonarsource @steakhal > > This breaks the type info loaded correctly in previous decl instantiation: > [...] Thank you for reporting @Abramo-Bagnara. Could you create a dedicated GH issue for this please? FYI: I don't have plans to work on it though, but s

[clang] [modules] Handle friend function that was a definition but became only a declaration during AST deserialization (PR #132214)

2025-04-04 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin commented: PTAL https://github.com/llvm/llvm-project/pull/132214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2025-04-04 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > It seems to be running on my .h files itself(?) In that case, I don't believe clang-tidy considers the header "a header", but actually "the main file" just like when analyzing a .cpp file. In that case, `ExcludeHeaderFilterRegex` won't work. https://github.com/llvm/llv

[clang] [llvm] [fatlto] Use the ThinLTO default pipeline for FatLTO (PR #134434)

2025-04-04 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/134434 >From a4919243c4dc2cfebb1494d0f46529b858c52ea0 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 4 Apr 2025 11:49:02 -0700 Subject: [PATCH] [fatlto] Use the ThinLTO default pipeline for FatLTO When coroutine

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

2025-04-04 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited 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] Reland [clang][dataflow] Fix unsupported types always being equal (PR #131575)

2025-04-04 Thread Jan Voung via cfe-commits
jvoung wrote: Hi, just checking if you wanted to merge this, or if there were any other issues. Thanks! https://github.com/llvm/llvm-project/pull/131575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] 561dcb2 - [Clang] Permit `-Xarch_` to be used with `--offload-arch` (#131884)

2025-04-04 Thread via cfe-commits
Author: Joseph Huber Date: 2025-03-21T08:25:52-05:00 New Revision: 561dcb26d4597b592caa417d36c1a4e09fb2be2d URL: https://github.com/llvm/llvm-project/commit/561dcb26d4597b592caa417d36c1a4e09fb2be2d DIFF: https://github.com/llvm/llvm-project/commit/561dcb26d4597b592caa417d36c1a4e09fb2be2d.diff

[clang] Hlsl dst function (PR #133828)

2025-04-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,85 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.2-library %s -fnative-half-type -emit-llvm -O1 -o - | FileCheck %s + + +// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float> @_Z12dstWithFloatDv4_fS_( +// CHECK-SAME: <4

[clang] [llvm] [fatlto] Use the ThinLTO default pipeline for FatLTO (PR #134434)

2025-04-04 Thread Paul Kirth via cfe-commits
@@ -1692,6 +1692,19 @@ PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO, if (ThinLTO && PGOOpt && PGOOpt->Action == PGOOptions::SampleUse) MPM.addPass(buildThinLTODefaultPipeline(Level, /*ImportSummary=*/nullptr)); else { +// ModuleSimp

[clang] [llvm] [fatlto] Use the ThinLTO default pipeline for FatLTO (PR #134434)

2025-04-04 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/134434 >From 80c36153e55398bee01e0167e722c930732b48e7 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 4 Apr 2025 11:49:02 -0700 Subject: [PATCH] [fatlto] Add coroutine passes when using FatLTO with ThinLTO When c

[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-04-04 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,3329 @@ +// RUN: %clang_cc1 -triple nvptx-unknown-unknown -fcuda-is-device -O3 -o - %s -emit-llvm | FileCheck %s +// RUN: %clang_cc1 -triple nvptx64-unknown-unknown -fcuda-is-device -O3 -o - %s -emit-llvm | FileCheck %s +#include "../Headers/Inputs/include/cuda.h" ---

[clang] Hlsl dst function (PR #133828)

2025-04-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +float4 test_too_many_arg(float4 p0) +{ +dst(p0, p0, p0); + // expected-error@-1 {{no matching function

[clang] 335a461 - Revert "[clang] NFC: Clear some uses of MemberPointerType::getClass" (#132281)

2025-04-04 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-03-20T17:54:21-03:00 New Revision: 335a4614dee4123ff4f86e6400fc6a305766e227 URL: https://github.com/llvm/llvm-project/commit/335a4614dee4123ff4f86e6400fc6a305766e227 DIFF: https://github.com/llvm/llvm-project/commit/335a4614dee4123ff4f86e6400fc6a305766e227.dif

[clang] [clang] Add SPIR-V to some OpenMP clang tests (PR #133503)

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

[libclc] [libclc] Move lgamma, lgamma_r & tgamma to CLC library (PR #134053)

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

[clang] a187060 - Allow direct dispatch for the ObjFW runtime (#126382)

2025-04-04 Thread via cfe-commits
Author: Jonathan Schleifer Date: 2025-03-23T10:45:18-07:00 New Revision: a187060de9193ad3ff356195feb04b16f1f28ff0 URL: https://github.com/llvm/llvm-project/commit/a187060de9193ad3ff356195feb04b16f1f28ff0 DIFF: https://github.com/llvm/llvm-project/commit/a187060de9193ad3ff356195feb04b16f1f28ff0.

[clang] [Clang] Fix a lambda pattern comparison mismatch after ecc7e6ce4 (PR #133863)

2025-04-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/133863 In ecc7e6ce4, we tried to inspect the `LambdaScopeInfo` on stack to recover the instantiating lambda captures. However, there was a mismatch in how we compared the pattern declarations of lambdas: the constrain

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

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ilya Biryukov (ilya-biryukov) Changes This changes exposes a low-level helper that is used to implement `forEachArgumentWithParamType` but can also be used without matchers, e.g. if performance is a concern. Commit f5ee10538b68835112323c

[clang] Bypass alignment option based on architecture features instead of command-line flags (PR #134099)

2025-04-04 Thread Victor Campos via cfe-commits
https://github.com/vhscampos edited https://github.com/llvm/llvm-project/pull/134099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Introduce helpers for defining compatibilty warnings (PR #132129)

2025-04-04 Thread via cfe-commits
Sirraide wrote: > As a followup perhaps, I would LOVE it if we could modify the > DiagnosticsEmitter to make the calls here be `CompatDiag(SrcLoc, DiagBASE)`. > > WHERE: 1- It determines the C++ standard version itself, so it checks > LangOpts so we don't have to actually tell it what standard

[clang] [clang-format] Don't wrap before attributes in parameter lists (PR #132519)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fix #132240 --- Full diff: https://github.com/llvm/llvm-project/pull/132519.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+14) - (modified) clang/unittests/Format/FormatTest.c

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Fraser Cormack (frasercrmck) Changes These builtins are modeled on the clzg/ctzg builtins, which accept an optional second argument. This second argument is returned if the first argument is 0. --- Full diff: https://github.com/ll

[clang] [CIR] Upstream support for promoted types with unary plus/minus (PR #133829)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes The initial upstreaming of unary operations left promoted types unhandled for the unary plus and minus operators. This change implements support for promoted types and performs a bit of related code clea

[clang] [Clang][BPF] Add tests for btf_type_tag c2x-style attributes (PR #133666)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yonghong-song) Changes For btf_type_tag implementation, in order to have the same results with clang (__attribute__((btf_type_tag("...", gcc intends to use c2x syntax '[[...]]'. Clang also supports similar c2x syntax. Currently,

[clang] 10c6ebc - Reapply "[Clang] [NFC] Introduce a helper for emitting compatibility diagnostics (#132348)" (#134043)

2025-04-04 Thread via cfe-commits
Author: Sirraide Date: 2025-04-02T10:40:05+02:00 New Revision: 10c6ebc42711fa12ff790f3462cbce0e02538ab7 URL: https://github.com/llvm/llvm-project/commit/10c6ebc42711fa12ff790f3462cbce0e02538ab7 DIFF: https://github.com/llvm/llvm-project/commit/10c6ebc42711fa12ff790f3462cbce0e02538ab7.diff LOG:

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-04 Thread Deric C. via cfe-commits
@@ -253,6 +253,37 @@ const inline float length(__detail::HLSL_FIXED_VECTOR X) { return __detail::length_vec_impl(X); } +//===--===// +// lit builtins +//===--

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -135,6 +135,55 @@ mlir::Location CIRGenFunction::getLoc(mlir::Location lhs, mlir::Location rhs) { return mlir::FusedLoc::get(locs, metadata, &getMLIRContext()); } +bool CIRGenFunction::ContainsLabel(const Stmt *s, bool ignoreCaseStmts) { bcardosolopes wr

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -135,6 +135,55 @@ mlir::Location CIRGenFunction::getLoc(mlir::Location lhs, mlir::Location rhs) { return mlir::FusedLoc::get(locs, metadata, &getMLIRContext()); } +bool CIRGenFunction::ContainsLabel(const Stmt *s, bool ignoreCaseStmts) { + // Null statement, not a label

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-04-04 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,20 @@ +set(LLVM_LINK_COMPONENTS + support + ) + +add_clang_library(clangTidyCustomModule STATIC + CustomTidyModule.cpp + QueryCheck.cpp + + LINK_LIBS + clangTidy + clangTidyUtils + + DEPENDS + ClangDriverOptions + ) + +clang_target_link_libraries(clangTidyCust

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: @Andres-Salamanca thanks for working on this. We usually write tests that exercise any possible different paths codegen can take. For next rounds: it's fine if you add less things in one go and make it more incremental with the use of (a) errorNYI and (b) assert on missing

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -263,6 +264,72 @@ static void terminateBody(CIRGenBuilderTy &builder, mlir::Region &r, b->erase(); } +mlir::LogicalResult CIRGenFunction::emitIfStmt(const IfStmt &s) { + mlir::LogicalResult res = mlir::success(); + // The else branch of a consteval if statement is al

[clang] Hlsl dst function (PR #133828)

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

[clang] Hlsl dst function (PR #133828)

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

[clang] Hlsl dst function (PR #133828)

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

[clang] Hlsl dst function (PR #133828)

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

[clang] Hlsl dst function (PR #133828)

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

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -462,6 +462,58 @@ def ReturnOp : CIR_Op<"return", [ParentOneOf<["FuncOp", "ScopeOp", "DoWhileOp", let hasVerifier = 1; } +//===--===// +// IfOp +//===-

[clang] [clang][bytecode] Reject constexpr-unknown values from comparisons (PR #133701)

2025-04-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/133701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Add infastructure to parse parameters (PR #133800)

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

[clang] [llvm] [HLSL][RootSignature] Add infastructure to parse parameters (PR #133800)

2025-04-04 Thread via cfe-commits
https://github.com/joaosaffran commented: Few questions to help me understand better the changes being introduced here. https://github.com/llvm/llvm-project/pull/133800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [llvm] [HLSL][RootSignature] Add infastructure to parse parameters (PR #133800)

2025-04-04 Thread via cfe-commits
@@ -89,37 +88,178 @@ bool RootSignatureParser::parseDescriptorTableClause() { CurToken.TokKind == TokenKind::kw_UAV || CurToken.TokKind == TokenKind::kw_Sampler) && "Expects to only be invoked starting at given keyword"); + TokenKind ParamKind = Cu

[clang] [llvm] [HLSL][RootSignature] Add infastructure to parse parameters (PR #133800)

2025-04-04 Thread via cfe-commits
@@ -89,37 +88,178 @@ bool RootSignatureParser::parseDescriptorTableClause() { CurToken.TokKind == TokenKind::kw_UAV || CurToken.TokKind == TokenKind::kw_Sampler) && "Expects to only be invoked starting at given keyword"); + TokenKind ParamKind = Cu

[clang] [clang][doc]: Merge the contents of identical entries. (PR #134089)

2025-04-04 Thread via cfe-commits
YLChenZ wrote: > But as it stands, I think this is better than repeating the same information > 15 times. Couldn't agree more. https://github.com/llvm/llvm-project/pull/134089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[libclc] [libclc] Skip opt command if opt_flags is empty (PR #130882)

2025-04-04 Thread Wenju He via cfe-commits
@@ -342,22 +342,32 @@ function(add_libclc_builtin_set) set( builtins_opt_lib_tgt builtins.opt.${ARG_ARCH_SUFFIX} ) - # Add opt target - add_custom_command( OUTPUT ${builtins_opt_lib_tgt}.bc -COMMAND ${opt_exe} ${ARG_OPT_FLAGS} -o ${builtins_opt_lib_tgt}.bc - ${bu

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

2025-04-04 Thread via cfe-commits
@@ -10043,12 +10043,19 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( // When [...] the constructor [...] is a candidate by //- [over.match.copy] (in all cases) if (TD) { - SmallVector TmpInits; - for (Expr *E : Inits) + + // As

[clang] [NFC][FMV][AArch64] Tidy up codegen tests. (PR #132273)

2025-04-04 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/132273 Removes attr-target-version.c which doesn't have a clear purpose. Introduces AArch64/fmv-detection.c to check detection bitmasks. Adds coverage in AArch64/fmv-resolver-emission.c >From d5f250d42f908ecae74b474

[libclc] [libclc]: clspv: add a dummy implememtation for mul_hi (PR #134094)

2025-04-04 Thread Romaric Jodin via cfe-commits
https://github.com/rjodinchr created https://github.com/llvm/llvm-project/pull/134094 clspv uses a better implementation that is not using a bigger side when not available. Add a dummy implementation for mul_hi to avoid to override the implementation of clspv with the one in libclc. >From 46d

[clang] 8a691cc - [MS][clang] Make sure vector deleting dtor calls correct operator delete (#133950)

2025-04-04 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2025-04-02T09:25:43+02:00 New Revision: 8a691cc6157b2c3bc91af767eb1154d7a715562a URL: https://github.com/llvm/llvm-project/commit/8a691cc6157b2c3bc91af767eb1154d7a715562a DIFF: https://github.com/llvm/llvm-project/commit/8a691cc6157b2c3bc91af767eb1154d7a71556

[clang] [CMAKE][AMDGPU] fix build failure caused by PR #133619 (PR #133776)

2025-04-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/133776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Buffer handle globals should not be constants (PR #130231)

2025-04-04 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/130231 >From bf5e5b4b1060f51d37b05c905b4327a40316f158 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 6 Mar 2025 17:50:12 -0800 Subject: [PATCH 1/2] [HLSL] Buffer handle globals should not be constants If these

[clang] Optimize Module Dependency Handling for Efficient Memory Usage (PR #132287)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ayush Pareek (ayushpareek2003) Changes Optimized addModuleFiles functions for both CompilerInvocation and CowCompilerInvocation to reduce redundant function calls and improve efficiency Introduced memory preallocation using reserve() when

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

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

[clang] [analyzer] Remove deprecated option VirtualCall:PureOnly (PR #131823)

2025-04-04 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. LGTM thanks, https://github.com/llvm/llvm-project/pull/131823 ___ cfe-commits mailing list cfe-commits@lists.l

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

2025-04-04 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,115 @@ +//===--- RunOnNewStack.cpp - Crash Recovery ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-04-04 Thread Mohamed Emad via cfe-commits
@@ -516,15 +518,16 @@ writeFileDefinition(const Location &L, std::make_unique(HTMLTag::TAG_A, std::to_string(L.LineNumber)); // The links to a specific line in the source code use the github / // googlesource notation so it won't work for all hosting pages. - // FIXM

[clang-tools-extra] [clang-tidy] Fix broken HeaderFilterRegex when read from config file (PR #133582)

2025-04-04 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1 @@ +HeaderFilterRegex: '.*' carlosgalvezp wrote: It appears this use case was broken by this [patch](https://github.com/llvm/llvm-project/commit/0249554ee1ac49e6f1d93fa78a55971fc706f635), @HerrCai0907 . There may be more things to fix. https:/

[clang] [llvm] [NVPTX] Add intrinsics for cvt .f6x2 and .ue8m0x2 variants (PR #134345)

2025-04-04 Thread Artem Belevich via cfe-commits
@@ -596,6 +605,28 @@ def __nvvm_e4m3x2_to_f16x2_rn_relu : NVPTXBuiltinSMAndPTX<"_Vector<2, __fp16>(sh def __nvvm_e5m2x2_to_f16x2_rn : NVPTXBuiltinSMAndPTX<"_Vector<2, __fp16>(short)", SM_89, PTX81>; def __nvvm_e5m2x2_to_f16x2_rn_relu : NVPTXBuiltinSMAndPTX<"_Vector<2, __fp16>

[clang] [llvm] [NVPTX] Add intrinsics for cvt .f6x2 and .ue8m0x2 variants (PR #134345)

2025-04-04 Thread Artem Belevich via cfe-commits
@@ -1021,6 +1036,174 @@ __device__ void nvvm_cvt_sm89() { __nvvm_e5m2x2_to_f16x2_rn(0x4c4c); // CHECK_PTX81_SM89: call <2 x half> @llvm.nvvm.e5m2x2.to.f16x2.rn.relu(i16 19532) __nvvm_e5m2x2_to_f16x2_rn_relu(0x4c4c); + + // CHECK_PTX81_SM89: call i32 @llvm.nvvm.f2tf32.rn

[clang] [llvm] [NVPTX] Add intrinsics for cvt .f6x2 and .ue8m0x2 variants (PR #134345)

2025-04-04 Thread Artem Belevich via cfe-commits
@@ -703,6 +703,53 @@ let hasSideEffects = false in { defm CVT_to_tf32_rz_satf : CVT_TO_TF32<"rz.satfinite", [hasPTX<86>, hasSM<100>]>; defm CVT_to_tf32_rn_relu_satf : CVT_TO_TF32<"rn.relu.satfinite", [hasPTX<86>, hasSM<100>]>; defm CVT_to_tf32_rz_relu_satf : CVT_TO_TF

[clang] [llvm] [NVPTX] Add intrinsics for cvt .f6x2 and .ue8m0x2 variants (PR #134345)

2025-04-04 Thread Artem Belevich via cfe-commits
@@ -580,6 +580,15 @@ def __nvvm_f2bf16_rz : NVPTXBuiltinSMAndPTX<"__bf16(float)", SM_80, PTX70>; def __nvvm_f2bf16_rz_relu : NVPTXBuiltinSMAndPTX<"__bf16(float)", SM_80, PTX70>; def __nvvm_f2tf32_rna : NVPTXBuiltinSMAndPTX<"int32_t(float)", SM_80, PTX70>; +def __nvvm_f2tf32_

[clang] Hlsl dst function (PR #133828)

2025-04-04 Thread via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +float4 test_too_many_arg(float4 p0) +{ +dst(p0, p0, p0); + // expected-error@-1 {{no matching function

[clang] refactor OffloadAction constructor for memory efficiency & cleaner access (PR #134447)

2025-04-04 Thread Ayush Pareek via cfe-commits
https://github.com/ayushpareek2003 created https://github.com/llvm/llvm-project/pull/134447 Avoided repeated DeviceDependences getter calls by using const auto & references No functional changes; pure memory and readability optimization >From 2689233873e3c0d998bbfb7bb240d39d1654a973 Mon Sep 17

[clang] refactor OffloadAction constructor for memory efficiency & cleaner access (PR #134447)

2025-04-04 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

<    1   2   3   4   5   6   7   8   9   >