[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-07-08 Thread David Stenberg via cfe-commits
dstenb wrote: Hi, @kadircet! This commit broke one of our downstream tests where we mount the repository as read-only, as the `static-compound-literals-crash.cpp` test attempts to write the output to the test source directory: ``` (frontend): unable to open output file '/path/to/repo/clang/t

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-08 Thread via cfe-commits
YexuanXiao wrote: The failed tests in CI are allowed to fail. See the [comment](https://github.com/llvm/llvm-project/pull/135386#issuecomment-3049426611) in another PR #135386. https://github.com/llvm/llvm-project/pull/143653 ___ cfe-commits mailing

[clang] [llvm] [AMDGPU] Add support for `v_cvt_f16_bf8` on gfx1250 (PR #146305)

2025-07-08 Thread Shilei Tian via cfe-commits
@@ -2,51 +2,41 @@ # RUN: llvm-mc -triple=amdgcn -mcpu=gfx1250 -mattr=+real-true16 -disassemble -show-encoding < %s | FileCheck -check-prefixes=GFX1250,GFX1250-REAL16 %s # RUN: llvm-mc -triple=amdgcn -mcpu=gfx1250 -mattr=-real-true16 -disassemble -show-encoding < %s | FileCheck

[clang] [Clang] Fix crash on `void{}` (PR #147514)

2025-07-08 Thread Erich Keane via cfe-commits
@@ -13,4 +13,7 @@ void f() { void(); } +// CHECK: define{{.*}} void @_ZN8GH1164401fEv() erichkeane wrote: There is no target-triple on this test, so this will fail in windows mode. You can try running it with `-triple x86_64-windows-pc` to see what I mean

[clang] [Clang] Fix crash on `void{}` (PR #147514)

2025-07-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/147514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-07-08 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/146314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] WIP: Extend SourceLocation to 64 bits. (PR #146314)

2025-07-08 Thread Haojian Wu via cfe-commits
hokein wrote: Closing it in favor of #147292 https://github.com/llvm/llvm-project/pull/146314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix crash on `void{}` (PR #147514)

2025-07-08 Thread Corentin Jabot via cfe-commits
@@ -13,4 +13,7 @@ void f() { void(); } +// CHECK: define{{.*}} void @_ZN8GH1164401fEv() cor3ntin wrote: oups! https://github.com/llvm/llvm-project/pull/147514 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [Clang] Fix crash on `void{}` (PR #147514)

2025-07-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/147514 >From 4b536efe500f3b9099d1cf1a1a8775633e193249 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 8 Jul 2025 14:34:16 +0200 Subject: [PATCH 1/3] [Clang] Fix crash on `void{}` Caused by an incorrect asser

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-08 Thread Aaron Ballman via cfe-commits
@@ -4111,7 +4111,10 @@ static ActionResult getPatternForClassTemplateSpecialization( if (Ambiguous) { // Partial ordering did not produce a clear winner. Complain. Inst.Clear(); - ClassTemplateSpec->setInvalidDecl(); + + if (!S.isS

[clang] [llvm] [LLVM][AArch64] Relax SVE codegen predicates for sm4 instructions (PR #147524)

2025-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Elvina Yakubova (ElvinaYakubova) Changes Adds sve-sm4 to reference FEAT_SVE_SM4 without specifically enabling SVE2. --- Patch is 23.49 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/147524.diff

[clang] [llvm] [LLVM][AArch64] Relax SVE codegen predicates for sm4 instructions (PR #147524)

2025-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Elvina Yakubova (ElvinaYakubova) Changes Adds sve-sm4 to reference FEAT_SVE_SM4 without specifically enabling SVE2. --- Patch is 23.49 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/1

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-08 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/146224 >From 43e2dc670d7c9ed5e23b5d26dff1e273c84b5a53 Mon Sep 17 00:00:00 2001 From: yronglin Date: Thu, 3 Jul 2025 02:15:22 +0800 Subject: [PATCH 1/8] [C23][Parser] Diagnostic for attribute declaration where stateme

[clang] [llvm] [LLVM][AArch64] Relax SVE codegen predicates for sm4 instructions (PR #147524)

2025-07-08 Thread Elvina Yakubova via cfe-commits
https://github.com/ElvinaYakubova created https://github.com/llvm/llvm-project/pull/147524 Adds sve-sm4 to reference FEAT_SVE_SM4 without specifically enabling SVE2. >From ebeb06ea91035be22d3395f86d8e2cf513a77ccc Mon Sep 17 00:00:00 2001 From: Elvina Yakubova Date: Fri, 4 Jul 2025 07:04:44 -07

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/147275 >From 346ac892d7575ac779295b9db11bc895f37f160e Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 7 Jul 2025 12:41:53 +0200 Subject: [PATCH 1/3] [Clang] Do not mark ambiguous specialization invalid. When

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-08 Thread Corentin Jabot via cfe-commits
@@ -4111,7 +4111,10 @@ static ActionResult getPatternForClassTemplateSpecialization( if (Ambiguous) { // Partial ordering did not produce a clear winner. Complain. Inst.Clear(); - ClassTemplateSpec->setInvalidDecl(); + + if (!S.isS

[clang] [clang-tools-extra] [lldb] [clang] Extend SourceLocation to 64 bits. (PR #147292)

2025-07-08 Thread Haojian Wu via cfe-commits
hokein wrote: > Ah, not a problem, the new one is fine. I was just very thrown/wondering why > I was reviewing something so similar again. Sorry for not being clearer about that. I’ll go ahead and close the previous review. The new one should already incorporate your review comments from the

[clang] [clang][bytecode] Don't crash on erroneous switch conditions (PR #147533)

2025-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Not attaching a test since I've only seen this when compiling a large c++26 test case as c++17. --- Full diff: https://github.com/llvm/llvm-project/pull/147533.diff 1 Files Affected: - (modified) clang/li

[clang] [CIR] Add bit reverse and byte reverse operations (PR #147200)

2025-07-08 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/147200 >From 2dc9775f797f944cb0f12f68bc914a0b4bb89609 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Mon, 7 Jul 2025 00:45:48 +0800 Subject: [PATCH] [CIR] Add bit reverse and byte reverse operations --- clang/include/

[clang] [CIR] Add bit reverse and byte reverse operations (PR #147200)

2025-07-08 Thread Sirui Mu via cfe-commits
@@ -190,6 +190,26 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID, expectedValue, probAttr); return RValue::get(result); } + + case Builtin::BI__builtin_bswap16: + case Builtin::BI__buil

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-08 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/147275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 39bc052 - [analyzer] Conversion to CheckerFamily: MallocChecker (#147080)

2025-07-08 Thread via cfe-commits
Author: Donát Nagy Date: 2025-07-08T15:56:21+02:00 New Revision: 39bc0529b018a89b4b6a21aaabe240cd3a65c44d URL: https://github.com/llvm/llvm-project/commit/39bc0529b018a89b4b6a21aaabe240cd3a65c44d DIFF: https://github.com/llvm/llvm-project/commit/39bc0529b018a89b4b6a21aaabe240cd3a65c44d.diff LO

[clang] [clang][bytecode] Don't crash on erroneous switch conditions (PR #147533)

2025-07-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/147533 Not attaching a test since I've only seen this when compiling a large c++26 test case as c++17. >From fe3d8b287ddeff8730ee3c235aaa7f237703faaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date

[clang] [Clang] Fix crash on `void{}` (PR #147514)

2025-07-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/147514 >From 17b593283e1a95ca12ee314140910b3f634a2a33 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 8 Jul 2025 14:34:16 +0200 Subject: [PATCH 1/3] [Clang] Fix crash on `void{}` Caused by an incorrect asser

[clang] [Clang] Set the FTM for trivial relocation (PR #142936)

2025-07-08 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: > @cor3ntin I think Apple Clang still complicates version detection, and we > can't use __has_builtin, because that's returned true for versions of Clang > where it's "broken" from libc++'s perspective. `__builtin_is_cpp_trivially_relocatable` is new in 21, it was never shipped

[clang] [Clang] suppress deprecated field warnings in implicit special-member functions (PR #147400)

2025-07-08 Thread Shashi Shankar via cfe-commits
https://github.com/shashi1687 updated https://github.com/llvm/llvm-project/pull/147400 >From 29c3c9c6d25cc7c47d01a9d819ea37e92361aea2 Mon Sep 17 00:00:00 2001 From: Shashi Shankar Date: Mon, 7 Jul 2025 22:54:22 +0200 Subject: [PATCH 1/3] Sema: suppress deprecated field warnings in implicit spe

[clang] [llvm] [LLVM][AArch64] Relax SVE codegen predicates for sm4 instructions (PR #147524)

2025-07-08 Thread Elvina Yakubova via cfe-commits
https://github.com/ElvinaYakubova updated https://github.com/llvm/llvm-project/pull/147524 >From ebeb06ea91035be22d3395f86d8e2cf513a77ccc Mon Sep 17 00:00:00 2001 From: Elvina Yakubova Date: Fri, 4 Jul 2025 07:04:44 -0700 Subject: [PATCH 1/2] [LLVM][AArch64] Relax SVE codegen predicates for sm4

[clang] [llvm] [LLVM][AArch64] Relax SVE codegen predicates for sm4 instructions (PR #147524)

2025-07-08 Thread Elvina Yakubova via cfe-commits
@@ -370,8 +370,11 @@ def FeatureSVEAES : ExtensionWithMArch<"sve-aes", "SVEAES", def FeatureAliasSVE2AES : ExtensionWithMArch<"sve2-aes", "SVE2AES", "", "Shorthand for +sve2+sve-aes", [FeatureSVE2, FeatureSVEAES]>; -def FeatureSVE2SM4 : ExtensionWithMArch<"sve2-sm4", "SVE2SM

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-07-08 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/141846 >From bfdf16cee252dc6491f15c0715c7a39538fbf120 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 23 Apr 2025 13:14:24 -0700 Subject: [PATCH 1/4] [Clang][attr] Add cfi_salt attribute The new 'cfi_salt' a

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-07-08 Thread via cfe-commits
@@ -25,20 +40,29 @@ int main() { auto lambda2 = [](int){}; auto lambda3 = [](double){}; - kernel(lambda1); - kernel2(lambda2); - kernel3(lambda3); + kernel_wrapper(lambda1); + kernel2_wrapper(lambda2); + kernel3_wrapper(lambda3); // Ensure the kernels are named

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-07-08 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/141846 >From bfdf16cee252dc6491f15c0715c7a39538fbf120 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 23 Apr 2025 13:14:24 -0700 Subject: [PATCH 1/3] [Clang][attr] Add cfi_salt attribute The new 'cfi_salt' a

[clang-tools-extra] [clang-tidy][NFC] Do more work at compile time (PR #147406)

2025-07-08 Thread Baranov Victor via cfe-commits
vbvictor wrote: Please make the title more detailed about what you changed excatly. https://github.com/llvm/llvm-project/pull/147406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-07-08 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions c,cpp,h -- clang/test/CodeGen/kcfi-salt.c clang/include/clan

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-07-08 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/141846 >From bfdf16cee252dc6491f15c0715c7a39538fbf120 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 23 Apr 2025 13:14:24 -0700 Subject: [PATCH 1/5] [Clang][attr] Add cfi_salt attribute The new 'cfi_salt' a

[clang] [clang][test] Avoid some C++14 warnings in discrim-union.cpp (PR #146829)

2025-07-08 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. https://github.com/llvm/llvm-project/pull/146829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Fix v2i8 call lowering, use generic ld/st nodes for call params (PR #146930)

2025-07-08 Thread Alex MacLean via cfe-commits
@@ -5754,47 +5540,106 @@ static SDValue combineADDRSPACECAST(SDNode *N, return SDValue(); } +static SDValue sinkProxyReg(SDValue R, SDValue Chain, +TargetLowering::DAGCombinerInfo &DCI) { AlexMaclean wrote: Added! https://github

[clang] [Clang][NFC] Add alias target for amdgpu-arch-tool and nvptx-arch-tool (PR #147558)

2025-07-08 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/147558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Fix v2i8 call lowering, use generic ld/st nodes for call params (PR #146930)

2025-07-08 Thread Alex MacLean via cfe-commits
@@ -5754,47 +5540,106 @@ static SDValue combineADDRSPACECAST(SDNode *N, return SDValue(); } +static SDValue sinkProxyReg(SDValue R, SDValue Chain, +TargetLowering::DAGCombinerInfo &DCI) { + switch (R.getOpcode()) { + case ISD::TRUNCATE: + case

[clang] [AMDGPU][Clang] Support bfloat16 arithmetic for GFX950 and GFX1250. (PR #147541)

2025-07-08 Thread Ivan Kosarev via cfe-commits
https://github.com/kosarev created https://github.com/llvm/llvm-project/pull/147541 None >From 24b368053741bf2c8e50ed027da8a9389f940e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolai=20H=C3=A4hnle?= Date: Mon, 7 Jul 2025 11:34:03 +0100 Subject: [PATCH] [AMDGPU][Clang] Support bfloat16 arithm

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-08 Thread via cfe-commits
@@ -159,6 +159,7 @@ def BuiltinRequiresHeader : DiagGroup<"builtin-requires-header">; def C99Compat : DiagGroup<"c99-compat">; def C23Compat : DiagGroup<"c23-compat">; def : DiagGroup<"c2x-compat", [C23Compat]>; +def CAttributeExtensions : DiagGroup<"c-attribute-extension">; -

[clang] [analyzer] Remove redundant bug type DoubleDelete (PR #147542)

2025-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Donát Nagy (NagyDonat) Changes This commit removes the DoubleDelete bug type from `MallocChecker.cpp` because it's completely redundant with the `DoubleFree` bug (which is already used for all allocator families, includi

[clang] [analyzer] Remove redundant bug type DoubleDelete (PR #147542)

2025-07-08 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/147542 This commit removes the DoubleDelete bug type from `MallocChecker.cpp` because it's completely redundant with the `DoubleFree` bug (which is already used for all allocator families, including new/delete). Th

[clang] [AMDGPU][Clang] Support bfloat16 arithmetic for GFX950 and GFX1250. (PR #147541)

2025-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ivan Kosarev (kosarev) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/147541.diff 2 Files Affected: - (modified) clang/lib/Basic/Targets/AMDGPU.h (+2) - (added) clang/test/CodeGen/AMDGPU/full-bf16.c (+23)

[clang] [analyzer] Remove redundant bug type DoubleDelete (PR #147542)

2025-07-08 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cpp -- clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp

[clang] [AMDGPU][Clang] Support bfloat16 arithmetic for GFX950 and GFX1250. (PR #147541)

2025-07-08 Thread Matt Arsenault via cfe-commits
@@ -451,6 +451,8 @@ class LLVM_LIBRARY_VISIBILITY AMDGPUTargetInfo final : public TargetInfo { CUMode = false; else if (F == "+image-insts") HasImage = true; + else if (F == "+gfx950-insts" || F == "+gfx1250-insts") +HasFullBFloat16 = true; -

[clang] [AMDGPU][Clang] Support bfloat16 arithmetic for GFX950 and GFX1250. (PR #147541)

2025-07-08 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/147541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Remove irrelevant overcomplicated test (PR #147536)

2025-07-08 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/147536 This commit removes the test file test-member-invalidation.cpp which was recently introduced in 39bc0529b018a89b4b6a21aaabe240cd3a65c44d by splitting off a test case from new.cpp. In that commit I preserved

[clang] [analyzer][NFC] Remove irrelevant overcomplicated test (PR #147536)

2025-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Donát Nagy (NagyDonat) Changes This commit removes the test file test-member-invalidation.cpp which was recently introduced in 39bc0529b018a89b4b6a21aaabe240cd3a65c44d by splitting off a test case from new.cpp. In that commit I preserved

[clang] [analyzer][NFC] Remove irrelevant overcomplicated test (PR #147536)

2025-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Donát Nagy (NagyDonat) Changes This commit removes the test file test-member-invalidation.cpp which was recently introduced in 39bc0529b018a89b4b6a21aaabe240cd3a65c44d by splitting off a test case from new.cpp. In that

[clang] [Clang] WIP: Take libstdc++ into account during GCC detection (PR #145056)

2025-07-08 Thread Frederik Harwath via cfe-commits
https://github.com/frederik-h updated https://github.com/llvm/llvm-project/pull/145056 >From 87c03ace23467a7d6cb7e466a02309b5b287a013 Mon Sep 17 00:00:00 2001 From: Frederik Harwath Date: Wed, 19 Feb 2025 16:01:56 +0100 Subject: [PATCH 1/4] [Clang] Take libstdc++ into account during GCC detecti

[clang] [Sema] Remove an unnecessary cast (NFC) (PR #147546)

2025-07-08 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/147546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU][Clang] Support bfloat16 arithmetic for GFX950 and GFX1250. (PR #147541)

2025-07-08 Thread Ivan Kosarev via cfe-commits
https://github.com/kosarev updated https://github.com/llvm/llvm-project/pull/147541 >From 33e0843a1b66383e88f8bee4d51ce382209eb4a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolai=20H=C3=A4hnle?= Date: Mon, 7 Jul 2025 11:34:03 +0100 Subject: [PATCH 1/2] [AMDGPU][Clang] Support bfloat16 arithmet

[clang] [AMDGPU][Clang] Support bfloat16 arithmetic. (PR #147541)

2025-07-08 Thread Ivan Kosarev via cfe-commits
https://github.com/kosarev edited https://github.com/llvm/llvm-project/pull/147541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [ASTMatchers][NFC] Replace `makeMatcher` function with CTAD (PR #147197)

2025-07-08 Thread Baranov Victor via cfe-commits
@@ -672,9 +672,15 @@ class Matcher { DynTypedMatcher Implementation; }; // class Matcher -/// A convenient helper for creating a Matcher without specifying -/// the template type argument. +// Deduction guide for Matcher. +template Matcher(MatcherInterface *) -> Matcher; +

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-08 Thread via cfe-commits
https://github.com/YexuanXiao edited https://github.com/llvm/llvm-project/pull/143653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 1e3f6a6 - [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (#147301)

2025-07-08 Thread via cfe-commits
Author: Victor Chernyakin Date: 2025-07-08T20:48:51+03:00 New Revision: 1e3f6a6c4fd8dafb208216ffcabe31fa978ca502 URL: https://github.com/llvm/llvm-project/commit/1e3f6a6c4fd8dafb208216ffcabe31fa978ca502 DIFF: https://github.com/llvm/llvm-project/commit/1e3f6a6c4fd8dafb208216ffcabe31fa978ca502.d

[clang-tools-extra] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (PR #147301)

2025-07-08 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/147301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (PR #147301)

2025-07-08 Thread via cfe-commits
github-actions[bot] wrote: @localspook 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 bui

[clang] [llvm] [PowerPC][clang] Fix triple constructor ambiguity causing "unknown" target triple on AIX (PR #147488)

2025-07-08 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,14 @@ +// Test for the Triple constructor ambiguity fix on AIX +// This test verifies that the default target triple is correctly resolved +// and doesn't fall back to "unknown" due to constructor ambiguity. + +// REQUIRES: system-aix hubert-reinterpret

[clang] [clang-tools-extra] [ASTMatchers][NFC] Replace `makeMatcher` function with CTAD (PR #147197)

2025-07-08 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/147197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-07-08 Thread Mariya Podchishchaeva via cfe-commits
@@ -25,20 +40,29 @@ int main() { auto lambda2 = [](int){}; auto lambda3 = [](double){}; - kernel(lambda1); - kernel2(lambda2); - kernel3(lambda3); + kernel_wrapper(lambda1); + kernel2_wrapper(lambda2); + kernel3_wrapper(lambda3); // Ensure the kernels are named

[clang] [NFC][PowerPC][clang] Update clang/test/Driver/aix-default-target-triple.c for AIX specific targets (PR #147584)

2025-07-08 Thread Tony Varghese via cfe-commits
https://github.com/tonykuttai created https://github.com/llvm/llvm-project/pull/147584 This is a followup on the [[PowerPC][clang] Fix triple constructor ambiguity causing "unknown" target triple on AIX](https://github.com/llvm/llvm-project/pull/147488#top) to address the [post-commit review

[clang] Propogate linker flags when -static-pie is enabled in BareMetal Toolchain (PR #147589)

2025-07-08 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/147589 >From c6420bc64c2745c49400408ba93afa34eea194e3 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Tue, 8 Jul 2025 12:44:44 -0700 Subject: [PATCH] Propogate linker flags when `-static-pie` is enabled in Bar

[clang] Add necessary linker flags when -static-pie is enabled in BareMetal Toolchain (PR #147589)

2025-07-08 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/147589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][AArch64] Parse more features in getHostCPUFeatures (PR #146323)

2025-07-08 Thread Elvina Yakubova via cfe-commits
https://github.com/ElvinaYakubova updated https://github.com/llvm/llvm-project/pull/146323 >From 223c9e04c01558624eb63f8891ef51338a6f7da3 Mon Sep 17 00:00:00 2001 From: Elvina Yakubova Date: Thu, 26 Jun 2025 09:07:23 -0700 Subject: [PATCH 1/5] [clang][AArch64] Parse more features in getHostCPU

[clang] [llvm] [clang][AArch64] Parse more features in getHostCPUFeatures (PR #146323)

2025-07-08 Thread Elvina Yakubova via cfe-commits
@@ -2082,8 +2082,13 @@ const StringMap sys::getHostCPUFeatures() { .Case("fp", "fp-armv8") .Case("crc32", "crc") .Case("atomics", "lse") +

[clang] 191386f - [C23][Parser] Diagnostic for attribute declaration where statement is required (#146224)

2025-07-08 Thread via cfe-commits
Author: yronglin Date: 2025-07-09T08:54:30+08:00 New Revision: 191386fcd3335c5b7194da209d71d16549a2bb2f URL: https://github.com/llvm/llvm-project/commit/191386fcd3335c5b7194da209d71d16549a2bb2f DIFF: https://github.com/llvm/llvm-project/commit/191386fcd3335c5b7194da209d71d16549a2bb2f.diff LOG:

[clang] [Clang][CodeGen] Emit “trap reasons” on UBSan traps (PR #145967)

2025-07-08 Thread Anthony Tran via cfe-commits
https://github.com/anthonyhatran edited https://github.com/llvm/llvm-project/pull/145967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Emit “trap reasons” on UBSan traps (PR #145967)

2025-07-08 Thread Anthony Tran via cfe-commits
https://github.com/anthonyhatran edited https://github.com/llvm/llvm-project/pull/145967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-08 Thread via cfe-commits
https://github.com/yronglin closed https://github.com/llvm/llvm-project/pull/146224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [clang][modules-driver] Add scanner to detect C++20 module presence (PR #147630)

2025-07-08 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth created https://github.com/llvm/llvm-project/pull/147630 This patch is part of a series to natively support C++20 module usage from the Clang driver (without requiring an external build system). This introduces a new scanner that detects C++20 module usage in sou

[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)

2025-07-08 Thread via cfe-commits
yronglin wrote: Do you need the help to merge this PR? https://github.com/llvm/llvm-project/pull/145164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [clang][modules-driver] Add scanner to detect C++20 module presence (PR #147630)

2025-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Naveen Seth Hanig (naveen-seth) Changes This patch is part of a series to natively support C++20 module usage from the Clang driver (without requiring an external build system). This introduces a new scanner that detects C++20 module usag

[clang-tools-extra] [clangd] Add tweak to override pure virtuals (PR #139348)

2025-07-08 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Do you need the help to merge this PR? https://github.com/llvm/llvm-project/pull/139348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [clang][modules-driver] Add scanner to detect C++20 module presence (PR #147630)

2025-07-08 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/147630 >From 6b440de2ed76a6095c4b68ba1301dfbd19f9a285 Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Fri, 13 Jun 2025 09:19:21 +0200 Subject: [PATCH 1/2] Reland [clang][modules-driver] Add scanner to detect

[clang] aa1829d - [NFC][HLSL] Move resource range logic from `SemaHLSL` to `RootSignatureValidations` (#147117)

2025-07-08 Thread via cfe-commits
Author: Finn Plummer Date: 2025-07-08T18:13:36-07:00 New Revision: aa1829df02b24cb8f4a1846348b5a7b4e0be62f8 URL: https://github.com/llvm/llvm-project/commit/aa1829df02b24cb8f4a1846348b5a7b4e0be62f8 DIFF: https://github.com/llvm/llvm-project/commit/aa1829df02b24cb8f4a1846348b5a7b4e0be62f8.diff

[clang] [CIR] Add test for parsing bitfield_info attribute (PR #147628)

2025-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: None (Andres-Salamanca) Changes This PR adds a test for parsing the bitfield_info attribute. Additionally, it updates the `storage_type` and `is_signed` fields to match the style used in the incubator ASM format guide. --- Full diff: h

[clang] [CIR] Add test for parsing bitfield_info attribute (PR #147628)

2025-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Andres-Salamanca) Changes This PR adds a test for parsing the bitfield_info attribute. Additionally, it updates the `storage_type` and `is_signed` fields to match the style used in the incubator ASM format guide. --- Full diff: htt

[clang] [llvm] [NFC][HLSL] Move resource range logic from `SemaHLSL` to `RootSignatureValidations` (PR #147117)

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

[clang] Address a handful of C4146 compiler warnings where literals can be replaced with std::numeric_limits (PR #147623)

2025-07-08 Thread Owen Pan via cfe-commits
@@ -777,7 +779,7 @@ template <> struct MappingTraits { IO.mapOptional("Maximum", signedMaximum); Space.Maximum = static_cast(signedMaximum); -if (Space.Maximum != -1u) +if (Space.Maximum != std::numeric_limits::max()) owenca wrote: ```suggest

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #147342)

2025-07-08 Thread Sarah Spall via cfe-commits
@@ -3995,4 +3995,4 @@ bool SemaHLSL::handleInitialization(VarDecl *VDecl, Expr *&Init) { } Init = C; return true; -} +} spall wrote: add the newline back. https://github.com/llvm/llvm-project/pull/147342 ___

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #147342)

2025-07-08 Thread Sarah Spall via cfe-commits
@@ -46,6 +46,59 @@ static bool CheckAllArgsHaveSameType(Sema *S, CallExpr *TheCall) { return false; } +static bool CheckAllArgTypesAreCorrect( +Sema *S, CallExpr *TheCall, +llvm::ArrayRef< +llvm::function_ref> +Checks) { + unsigned NumArgs = TheCall

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #147342)

2025-07-08 Thread Sarah Spall via cfe-commits
@@ -235,6 +288,30 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(const TargetInfo &TI, TheCall->setType(RetTy); break; } + case SPIRV::BI__builtin_spirv_refract: { +if (SemaRef.checkArgCount(TheCall, 3)) + return true; + +llvm::function_ref +C

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #147342)

2025-07-08 Thread Sarah Spall via cfe-commits
@@ -46,6 +46,59 @@ static bool CheckAllArgsHaveSameType(Sema *S, CallExpr *TheCall) { return false; } +static bool CheckAllArgTypesAreCorrect( +Sema *S, CallExpr *TheCall, +llvm::ArrayRef< +llvm::function_ref> +Checks) { + unsigned NumArgs = TheCall

[clang] [HLSL][RootSignature] Implement diagnostic for missed comma (PR #147350)

2025-07-08 Thread Finn Plummer via cfe-commits
@@ -34,3 +34,7 @@ void bad_root_signature_5() {} // expected-error@+1 {{expected ')' to denote end of parameters, or, another valid parameter of RootConstants}} [RootSignature(MultiLineRootSignature)] void bad_root_signature_6() {} + +// expected-error@+1 {{expected end of str

[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-07-08 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: My understanding is that "recoverable" in this context means we can actually generate sensible IR for the construct. So no errors, except for warnings promoted to errors (or certain errors which don't impact IRGen/CFG analysis). And if that isn't what isUnrecoverable() i

[clang] Propogate linker flags when -static-pie is enabled in BareMetal Toolchain (PR #147589)

2025-07-08 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/147589 >From a1f3797d0acb93e66959c5163aeb49213d2d32a1 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Tue, 8 Jul 2025 12:44:44 -0700 Subject: [PATCH] Propogate linker flags when `-static-pie` is enabled in Bar

[clang] Propogate linker flags when -static-pie is enabled in BareMetal Toolchain (PR #147589)

2025-07-08 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt created https://github.com/llvm/llvm-project/pull/147589 None >From 6f96fc844751a95ee18b69ddb850ddd2fe76a89c Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Tue, 8 Jul 2025 07:21:37 -0700 Subject: [PATCH 1/2] Propogate appropriate linker flags for `-static-pi

[clang] [clang][bytecode] Create a temporary for discarded CXXBindTemporaryExprs (PR #147303)

2025-07-08 Thread Timm Baeder via cfe-commits
@@ -3,6 +3,11 @@ // RUN: %clang_cc1 -std=c++2a -verify=expected,cxx20 %s "-DNEW=::operator new" "-DDELETE=::operator delete" // RUN: %clang_cc1 -std=c++2c -verify=expected,cxx26 %s "-DNEW=::operator new" "-DDELETE=::operator delete" +// RUN: %clang_cc1 -std=c++2a -verify=exp

[clang] [NFC][PowerPC][clang] Update clang/test/Driver/aix-default-target-triple.c for AIX specific targets (PR #147584)

2025-07-08 Thread Hubert Tong via cfe-commits
@@ -3,6 +3,7 @@ // and doesn't fall back to "unknown" due to constructor ambiguity. // REQUIRES: system-aix +// SUPPORTED: target={{.*}}-aix{{.*}} hubert-reinterpretcast wrote: ```suggestion // REQUIRES: system-aix, target={{.*}}-aix{{.*}} ``` https://github

[clang] [llvm] [llvm-objcopy][libObject] Add RISC-V big-endian support (PR #146913)

2025-07-08 Thread Craig Topper via cfe-commits
@@ -1829,6 +1844,9 @@ Triple Triple::get32BitArchVariant() const { case Triple::ppc64le:T.setArch(Triple::ppcle); break; case Triple::renderscript64: T.setArch(Triple::renderscript32); break; case Triple::riscv64:T.setArch(Triple::riscv32); break; + cas

[clang] [llvm] [llvm-objcopy][libObject] Add RISC-V big-endian support (PR #146913)

2025-07-08 Thread Craig Topper via cfe-commits
@@ -63,6 +63,10 @@ StringRef Triple::getArchTypeName(ArchType Kind) { case renderscript64: return "renderscript64"; case riscv32:return "riscv32"; case riscv64:return "riscv64"; + case riscv32be: topperc wrote: Follow the existing format

[clang] [llvm] [llvm-objcopy][libObject] Add RISC-V big-endian support (PR #146913)

2025-07-08 Thread Craig Topper via cfe-commits
@@ -237,7 +241,10 @@ StringRef Triple::getArchTypePrefix(ArchType Kind) { case wasm64: return "wasm"; case riscv32: - case riscv64: return "riscv"; + case riscv64: + case riscv32be: + case riscv64be: +return "riscv"; topperc wrote: Follow

[clang] [CIR] Fold ComplexRealOp from ComplexCreateOp (PR #147592)

2025-07-08 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: I'm not sure we want to do this as part of our general canonicalization. It's a good optimization, but I don't think this kind of thing should be happening before the optimization phase. That may be true of most of our folders. I suppose this is a broad

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #147342)

2025-07-08 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,19 @@ +; Function Attrs: alwaysinline mustprogress nofree norecurse nosync nounwind willreturn memory(none) damyanp wrote: Can you help me understand what this file is for please? It doesn't look like it is actually testing anything. https://github

[clang] [Clang][Driver][SamplePGO] Enable -fsample-profile-use-profi by default (PR #146795)

2025-07-08 Thread Nilanjana Basu via cfe-commits
nilanjana87 wrote: Heads up: I'll merge this branch tomorrow. Let me know if any of the downstream users need more time before this goes in. > LGTM, please give downstream users ~1w to add the opt out flag to build > configs before landing this. > > CC @llvm/pr-subscribers-pgo for visibility

[clang] [Clang][Driver][SamplePGO] Enable -fsample-profile-use-profi by default (PR #146795)

2025-07-08 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/146795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix manual memory management with SmallVector in ConceptRef (PR #147231)

2025-07-08 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Thanks, this is a nice refactor. https://github.com/llvm/llvm-project/pull/147231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4