[clang] [clang] Fix crash 'Cannot get layout of forward declarations' during CTU static analysis (PR #156056)

2025-09-02 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/156056 From 7da69b65a6cb614023c0cd22a01b1693ce622401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Tue, 26 Aug 2025 10:20:42 +0200 Subject: [PATCH 1/4] [clang] Fix of a crash 'Cannot get lay

[clang] [clang][analyzer] Remove checker 'alpha.core.CastSize' (PR #156350)

2025-09-02 Thread Balázs Kéri via cfe-commits
https://github.com/balazske closed https://github.com/llvm/llvm-project/pull/156350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Fix off-by-one error in CommandMangler (PR #156593)

2025-09-02 Thread Nathan Ridge via cfe-commits
@@ -526,6 +526,16 @@ TEST(CommandMangler, RespectsOriginalSysroot) { Not(HasSubstr(testPath("fake/sysroot"; } } + +TEST(CommandMangler, StdLatestFlag) { + const auto Mangler = CommandMangler::forTests(); + tooling::CompileCommand Cmd; + Cmd.CommandLine

[clang-tools-extra] [clangd] Fix off-by-one error in CommandMangler (PR #156593)

2025-09-02 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/156593 SawInput() is intended to be called for every argument after a `--`, but it was mistakenly being called for the `--` itself. Partially fixes https://github.com/clangd/clangd/issues/1850 >From fa70f4e722

[clang] [clang][RISCV] support BITINT with mixed-type (PR #156592)

2025-09-02 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff origin/main HEAD --extensions c,cpp -- clang/test/CodeGen/RISCV/bitint.c clang/lib/Co

[clang] [clang][analyzer] Model `strxfrm` (PR #156507)

2025-09-02 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/156507 From 736d0dcf2e31f402607656bf14f8c8dd6539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Fri, 29 Aug 2025 09:51:04 +0200 Subject: [PATCH 1/3] [

[clang] [clang][RISCV] support BITINT with mixed-type (PR #156592)

2025-09-02 Thread Piyou Chen via cfe-commits
https://github.com/BeMg created https://github.com/llvm/llvm-project/pull/156592 Implement https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/419. This patch makes the type extension based on the variable type for BIGINT, rather than using sign extension for all cases. >From 092700505

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-09-02 Thread via cfe-commits
@@ -215,6 +215,8 @@ def warn_c23_compat_case_range : Warning< DefaultIgnore, InGroup; def ext_c2y_case_range : Extension< "case ranges are a C2y extension">, InGroup; +def err_c2y_labeled_break_continue : Error< + "labeled %select{'break'|'continue'}0 is only supported in

[clang] [CIR] Emit copy for aggregate initialization (PR #155697)

2025-09-02 Thread Henrich Lauko via cfe-commits
@@ -2431,6 +2431,51 @@ def CIR_CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { ]; } +//===--===// +// CopyOp +//===--===// + +def C

[clang] [CIR] Emit copy for aggregate initialization (PR #155697)

2025-09-02 Thread Henrich Lauko via cfe-commits
@@ -118,6 +118,44 @@ DeletionKind cir::StoreOp::removeBlockingUses( return DeletionKind::Delete; } +//===--===// +// Interfaces for CopyOp +//===--

[clang] [CIR] Emit copy for aggregate initialization (PR #155697)

2025-09-02 Thread Henrich Lauko via cfe-commits
@@ -2431,6 +2431,51 @@ def CIR_CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { ]; } +//===--===// +// CopyOp +//===--===// + +def C

[clang] [CIR] Emit copy for aggregate initialization (PR #155697)

2025-09-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/155697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix `readability-uppercase-literal-suffix` warning with hex literals (PR #156584)

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

[clang] [llvm] [SPIRV] Add OpInf support for isinf hlsl intrinsic (PR #156570)

2025-09-02 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/156570 fixes #148051 - update EmitHLSLBuiltinExpr in CGHLSLBuiltins.cpp to toggle intrinsics by target - Add a GENERATE_HLSL_INTRINSIC_FUNCTION for isinf in CGHLSLRuntime.h - Update the SPIRVInstructionSelector.cpp to

[clang] [libclang/python] Add type annotations for code completion classes (PR #140539)

2025-09-02 Thread Vlad Serebrennikov via cfe-commits
@@ -3115,44 +3116,47 @@ def __repr__(self): class CodeCompletionResult(Structure): _fields_ = [("cursorKind", c_int), ("completionString", c_object_p)] -def __repr__(self): +def __repr__(self) -> str: return str(CompletionString(self.completionString))

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-09-02 Thread Shamshura Egor via cfe-commits
egorshamshura wrote: > I'm OK with this, but don't have a 'rerun CI' button. I can try 1 thing to > start it over (force a merge), so I'll give that a shot, else you m ight need > to do some patch pushes. I guess it's fine now https://github.com/llvm/llvm-project/pull/152488 _

[clang] [CIR] Support ComplexType in CallExpr args (PR #156236)

2025-09-02 Thread Bruno Cardoso Lopes via cfe-commits
@@ -909,3 +909,46 @@ void foo33(__builtin_va_list a) { // OGCG: %[[B_IMAG_PTR:.*]] = getelementptr inbounds nuw { float, float }, ptr %[[B_ADDR]], i32 0, i32 1 // OGCG: store float %[[RESULT_REAL]], ptr %[[B_REAL_PTR]], align 4 // OGCG: store float %[[RESULT_IMAG]], ptr %[[

[clang-tools-extra] [clang-tidy] Fix `readability-uppercase-literal-suffix` warning with hex literals (PR #156584)

2025-09-02 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. https://github.com/llvm/llvm-project/pull/156584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 10dbb45 - [RISCV] Remove unused `IntrinsicTypes` from help functions in RISCV.cpp. NFC.

2025-09-02 Thread Jim Lin via cfe-commits
Author: Jim Lin Date: 2025-09-03T13:00:56+08:00 New Revision: 10dbb45e5c278dbbae4c0c3744482e0ebb557a9a URL: https://github.com/llvm/llvm-project/commit/10dbb45e5c278dbbae4c0c3744482e0ebb557a9a DIFF: https://github.com/llvm/llvm-project/commit/10dbb45e5c278dbbae4c0c3744482e0ebb557a9a.diff LOG:

[clang] [HLSL][NFC] Add assert to verify implicit binding resource attribute exists (PR #156094)

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

[clang] a953219 - [HLSL][NFC] Add assert to verify implicit binding resource attribute exists (#156094)

2025-09-02 Thread via cfe-commits
Author: Helena Kotas Date: 2025-09-02T21:57:41-07:00 New Revision: a9532191b82b02e6690e13fb72f513ab16119652 URL: https://github.com/llvm/llvm-project/commit/a9532191b82b02e6690e13fb72f513ab16119652 DIFF: https://github.com/llvm/llvm-project/commit/a9532191b82b02e6690e13fb72f513ab16119652.diff

[clang] [Clang] Assume unaligned in maksed load / store builtins (PR #156063)

2025-09-02 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > In theory we can lower masked load/store on any target; it's just a question > of how terrible the resulting code is. And on a target that doesn't support > unaligned load/store, the answer is, pretty terrible. But basically > everything that supports vectors has unaligned acc

[clang-tools-extra] [clang-tidy] Teach `readability-uppercase-literal-suffix` about C++23 and C23 suffixes (PR #148275)

2025-09-02 Thread Victor Chernyakin via cfe-commits
localspook wrote: Good catch, thank you! Opened #156584 with a fix. https://github.com/llvm/llvm-project/pull/148275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-09-02 Thread via cfe-commits
@@ -215,6 +215,8 @@ def warn_c23_compat_case_range : Warning< DefaultIgnore, InGroup; def ext_c2y_case_range : Extension< "case ranges are a C2y extension">, InGroup; +def err_c2y_labeled_break_continue : Error< + "labeled %select{'break'|'continue'}0 is only supported in

[clang] [clang-tools-extra] [compiler-rt] [flang] [libc] [libcxx] [lldb] [llvm] [mlir] [openmp] Fix typos and spelling errors across codebase (PR #156270)

2025-09-02 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. Static Analyzer (`clang/include/clang/StaticAnalyzer`, `clang/lib/StaticAnalyzer`, `clang/test/Analysis`) looks good to me. I also agree that creating multiple patches would be better than this single mega-patch. https://github.com/llvm

[clang] [clang] Make vector cast intrinsics constexpr (PR #156381)

2025-09-02 Thread Chaitanya Koparkar via cfe-commits
https://github.com/ckoparkar commented: - I think you missed `_mm256_castph256_*` intrinsics. - Could you please add `TEST_CONSTEXPR` tests to appropriate files? E.g. to [`avx512f-builtins.c`](https://github.com/llvm/llvm-project/blob/main/clang/test/CodeGen/X86/avx512f-builtins.c), [`avx512fp

[clang] [clang-shlib] Fix linking libclang-cpp on Haiku (PR #156401)

2025-09-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brad Smith (brad0) Changes Haiku requires linking in libnetwork. --- Full diff: https://github.com/llvm/llvm-project/pull/156401.diff 1 Files Affected: - (modified) clang/tools/clang-shlib/CMakeLists.txt (+4) ``diff diff --gi

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-09-02 Thread Ulrich Weigand via cfe-commits
@@ -0,0 +1,2427 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 +; Test Flag Output Operands with 14 combinations of CCMASK and optimizations. +; This tests mixing XOR wirh OR, XOR with AND and OR with AND with +; different

[clang] [llvm] [OMPIRBuilder] Use target global AS for SrcLocStr (PR #156520)

2025-09-02 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/156520 None >From 9c502a4fad10d8854d621ff72f08df9bd31f8949 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 2 Sep 2025 12:45:22 -0700 Subject: [PATCH] [clang][OpenMP] Use target global AS for SrcLocStr Signed-

[clang] [clang] Remove written template args from implicit var tpl spec (PR #156329)

2025-09-02 Thread Matheus Izvekov via cfe-commits
@@ -11662,7 +11662,8 @@ class Sema final : public SemaBase { DeclResult CheckVarTemplateId(VarTemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation TemplateNameLoc, -c

[clang] [CIR] Add support for discrete bit-field (PR #156085)

2025-09-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. https://github.com/llvm/llvm-project/pull/156085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix AST dump test on Mac OS (PR #156498)

2025-09-02 Thread via cfe-commits
Sirraide wrote: Seems like this test now also including absolute paths to some CI directories? I’ll remove this test entirely and add it back in a separate pr so it stops breaking the bots. https://github.com/llvm/llvm-project/pull/156498 ___ cfe-com

[clang] [llvm] [InstCombine] Strip leading zero indices from GEP (PR #155415)

2025-09-02 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: I finally got some IR and maybe some other info. With `-opt-bisect-limit` it appears that the issue is coming from GVN on the function `_ZN47LlvmLibcCharacterConverterUTF32To8Test_FourByte3RunEv`. After that the particular tests fails at runtime. I attached the IR after the pass

[clang] [llvm] [OMPIRBuilder] Use target global AS for SrcLocStr (PR #156520)

2025-09-02 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/156520 >From 9c502a4fad10d8854d621ff72f08df9bd31f8949 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 2 Sep 2025 12:45:22 -0700 Subject: [PATCH 1/2] [clang][OpenMP] Use target global AS for SrcLocStr Signed-of

[clang] [HLSL] Add copy assignment and construtor to resource types (PR #156075)

2025-09-02 Thread Steven Perron via cfe-commits
https://github.com/s-perron ready_for_review https://github.com/llvm/llvm-project/pull/156075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][clang] Fix CaptureRegion for message clause (PR #156525)

2025-09-02 Thread Robert Imschweiler via cfe-commits
https://github.com/ro-i auto_merge_enabled https://github.com/llvm/llvm-project/pull/156525 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Change the alloca address space in NVPTXLowerAlloca (PR #154814)

2025-09-02 Thread Theodoros Theodoridis via cfe-commits
@@ -502,3 +497,27 @@ void NVPTXPassConfig::addMachineSSAOptimization() { addPass(&PeepholeOptimizerLegacyID); printAndVerify("After codegen peephole optimization pass"); } + +bool NVPTXTargetMachine::isCompatibleDataLayout( +const DataLayout &Candidate) const { + // XX

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-09-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Sorry, this fell off my list of reviews somehow! Anyway, the overall direction is WAY better than last time I was able to take a look, I think this is pretty close. Thanks! https://github.com/llvm/llvm-project/pull/152870

[clang] [llvm] [AMDGPU][gfx1250] Add 128B cooperative atomics (PR #156418)

2025-09-02 Thread Pierre van Houtryve via cfe-commits
Pierre-vh wrote: * **#156418** https://app.graphite.dev/github/pr/llvm/llvm-project/156418?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/15

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-09-02 Thread Erich Keane via cfe-commits
@@ -215,6 +215,8 @@ def warn_c23_compat_case_range : Warning< DefaultIgnore, InGroup; def ext_c2y_case_range : Extension< "case ranges are a C2y extension">, InGroup; +def err_c2y_labeled_break_continue : Error< + "labeled %select{'break'|'continue'}0 is only supported in

[clang] [X86] Clear EVEX512 feature for 128-bit and 256-bit FMA intrinsics (PR #156472)

2025-09-02 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/156472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Permit half precision in `__builtin_complex` (PR #156479)

2025-09-02 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/156479 Summary: This was forbidden previously even which made us divergent with the GCC implementation. Permit this by simply removing this Sema check. Fixes: https://github.com/llvm/llvm-project/issues/156463 >From

[clang-tools-extra] [Clang-Tidy] Handle nested-name-specifier in "llvm-prefer-isa-or-dyn-cast-in-conditionals" (PR #155982)

2025-09-02 Thread Yanzuo Liu via cfe-commits
@@ -76,6 +136,16 @@ bool foo(Y *y, Z *z) { // CHECK-MESSAGES: :[[@LINE-2]]:7: warning: isa_and_nonnull<> is preferred // CHECK-FIXES: if (isa_and_nonnull(z->bar())) + if (z->bar() && cast_or_null(z->bar())) +return true; + // CHECK-MESSAGES: :[[@LINE-2]]:7: warning:

[clang] [CIR][NFC] Reorder GenExprComplex and add errors for unhandled visitors (PR #156241)

2025-09-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/156241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-09-02 Thread Alexey Bataev via cfe-commits
@@ -6582,4 +6740,40 @@ class OMPAssumeDirective final : public OMPExecutableDirective { } // end namespace clang +namespace llvm { +// Allow a Stmt* be casted correctly to an OMPLoopTransformationDirective*. +// The default routines would just use a C-style cast which won't

[clang] [llvm] [mlir] [Flang][OpenMP] Enable no-loop kernels (PR #155818)

2025-09-02 Thread Dominik Adamski via cfe-commits
https://github.com/DominikAdamski edited https://github.com/llvm/llvm-project/pull/155818 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Clear EVEX512 feature for 128-bit and 256-bit FMA intrinsics (PR #156472)

2025-09-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-windows` running on `linaro-armv8-windows-msvc-05` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/141/builds/11257 Here is the relevant piece of

[clang] [Sema] Diagnose use of if/else-if condition variable inside else-if/else branch(s) (PR #156436)

2025-09-02 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wconditional-scope %s + +int *get_something(); +int *get_something_else(); +int *get_something_else_again(); + +int test() { + if (int *ptr = get_something()) { +return ptr[0] * ptr[0]; + } + else if (int *ptr2 = g

[clang] [CIR] Upstream FPToFPBuiltin ACosOp (PR #156356)

2025-09-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/156356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-09-02 Thread via cfe-commits
jprotze wrote: In general, I think this PR is ready to land, as soon as we get any feedback from flang folks. The clang codegen was reviewed. The runtime implementation is merged. I reviewed the interfacing with the runtime. @mjklemm the flang implementation in the PR is more a stub than an ac

[clang] [clang][AArch64] Use .i16.f16 intrinsic formats for vcvth*_[s|u]16_f16 (PR #156029)

2025-09-02 Thread Tom Eccles via cfe-commits
tblah wrote: I'm pressing merge because @mrkajetanp is away https://github.com/llvm/llvm-project/pull/156029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] fix pc range condition check bug (PR #154902)

2025-09-02 Thread Wu Yingcong via cfe-commits
yingcong-wu wrote: Open PR https://github.com/llvm/llvm-project/pull/156383 to use llvm-objdump instead. https://github.com/llvm/llvm-project/pull/154902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-09-02 Thread Corentin Jabot via cfe-commits
@@ -14,7 +14,9 @@ #include "clang/AST/ASTConsumer.h" #include "clang/AST/ASTMutationListener.h" #include "clang/AST/DynamicRecursiveASTVisitor.h" +#include "clang/Basic/SourceLocation.h" #include "clang/Lex/HeaderSearch.h" +#include "clang/Lex/ModuleLoader.h"

[clang-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-09-02 Thread St. Muench via cfe-commits
https://github.com/stmuench updated https://github.com/llvm/llvm-project/pull/132924 >From 6acfd25f9f75f4f18bfc59703c86cc98f86c68f4 Mon Sep 17 00:00:00 2001 From: stmuench Date: Tue, 25 Mar 2025 12:38:53 +0100 Subject: [PATCH] [clang-tidy] do not diagn. array types in implicit templ. instantia

[clang] [CIR] Upstream FPToFPBuiltin ACosOp (PR #156356)

2025-09-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes Upstream support for FPToFPBuiltin ACosOp --- Full diff: https://github.com/llvm/llvm-project/pull/156356.diff 5 Files Affected: - (modified) clang/include/clang/CIR/Dialect/IR/CIROps.td (+9) - (modi

[clang] Add error check for HeuristicResolver (PR #155561)

2025-09-02 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/155561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SYCL] Add offload wrapping for SYCL kind. (PR #147508)

2025-09-02 Thread Maksim Sabianin via cfe-commits
@@ -620,6 +635,422 @@ void createRegisterFatbinFunction(Module &M, GlobalVariable *FatbinDesc, // Add this function to constructors. appendToGlobalCtors(M, CtorFunc, /*Priority=*/101); } + +/// SYCLWrapper helper class that creates all LLVM IRs wrapping given images. +stru

[clang] [analyzer] MallocChecker – Fix false positive leak for smart pointers in temporary objects (PR #152751)

2025-09-02 Thread Donát Nagy via cfe-commits
@@ -187,12 +202,12 @@ void test_variadic_constructor_bounds() { // The constructor has 1 formal parameter (T* p) plus ellipsis, but we pass multiple args // This should trigger the bounds checking issue in handleSmartPointerConstructorArguments int* raw_ptr = new int(42

[clang] [llvm] [SPIRV] Add OpInf support for isinf hlsl intrinsic (PR #156570)

2025-09-02 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff origin/main HEAD --extensions cpp,h -- clang/lib/CodeGen/CGHLSLBuiltins.cpp clang/lib

[clang] [Clang-Repl] Sinking RemoteJITUtils into Interpreter class(Refactoring) (PR #155140)

2025-09-02 Thread Vassil Vassilev via cfe-commits
@@ -51,6 +60,11 @@ class IncrementalExecutor { IncrementalExecutor(llvm::orc::ThreadSafeContext &TSC, llvm::orc::LLJITBuilder &JITBuilder, llvm::Error &Err); +#ifndef _WIN32 + IncrementalExecutor(llvm::orc::ThreadSafeContext &TSC, +

[clang] [CIR] Add handling for volatile loads and stores (PR #156124)

2025-09-02 Thread Morris Hafner via cfe-commits
https://github.com/mmha approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/156124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Add constexpr support for some AVX[512] intrinsics. (PR #156187)

2025-09-02 Thread via cfe-commits
@@ -3586,115 +3584,99 @@ _mm512_maskz_cvttps_epu32 (__mmask16 __U, __m512 __A) (__v16sf)_mm512_setzero_ps(), \ (__mmask16)(U), (int)(R))) -static __inline__ __m512 __DEFAULT_FN_ATTRS512 -_m

[clang] [Sema] Diagnose use of if/else-if condition variable inside else-if/else branch(s) (PR #156436)

2025-09-02 Thread via cfe-commits
Sirraide wrote: > IS a pattern folks actually use intentionally. So making this an error isn't > something we can really do. Right, I think I wasn’t quite awake yet earlier because for some reason I was only thinking about the very specific use case where the `if` statement checks if a pointe

[clang] [clang] Followup for constexpr-unknown potential constant expressions. (PR #151053)

2025-09-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` running on `linaro-clang-aarch64-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/22065 Here is the relevant pie

[clang] [LifetimeSafety] Refactor FactGenerator to use RecursiveASTVisitor (PR #153661)

2025-09-02 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/153661 >From 577d9638297f4383fa025b44d202903703863212 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 14 Aug 2025 06:57:44 + Subject: [PATCH] [LifetimeSafety] Track view types/gsl::Pointer. --- clang/lib/A

[clang] [Clang-Repl] Sinking RemoteJITUtils into Interpreter class(Refactoring) (PR #155140)

2025-09-02 Thread Vassil Vassilev via cfe-commits
@@ -444,6 +543,14 @@ size_t Interpreter::getEffectivePTUSize() const { return PTUs.size() - InitPTUSize; } +#ifndef _WIN32 +pid_t Interpreter::getOutOfProcessExecutorPID() const { + if (IncrExecutor) +return IncrExecutor->getOutOfProcessChildPid(); + return -1; +} +#en

[libunwind] [libunwind][test] change to use llvm-objdump (PR #156383)

2025-09-02 Thread Wu Yingcong via cfe-commits
https://github.com/yingcong-wu created https://github.com/llvm/llvm-project/pull/156383 In https://github.com/llvm/llvm-project/pull/154902, the test failed with llvm-clang-win-x-aarch64(it pretends to be a Linux build?), and objdump is not available there. Change the test to use llvm-objdump

[clang] [llvm] [RISCV][MC] Add MC support of Zibi experimental extension (PR #127463)

2025-09-02 Thread Boyao Wang via cfe-commits
https://github.com/BoyaoWang430 updated https://github.com/llvm/llvm-project/pull/127463 >From 33210107ae2db3b0c1d0ab038b4cc1c02acb3a29 Mon Sep 17 00:00:00 2001 From: wangboyao Date: Thu, 3 Jul 2025 16:08:15 +0800 Subject: [PATCH 1/3] [RISCV][MC] Add MC support of Zibi experimental extension T

[clang] 5f38548 - [Sema] Allow zero-size allocations for -Walloc-size (#155793)

2025-09-02 Thread via cfe-commits
Author: Vladimir Vuksanovic Date: 2025-09-02T08:18:56-07:00 New Revision: 5f38548c86c3e7bbfce3a739245d8f999e9946b5 URL: https://github.com/llvm/llvm-project/commit/5f38548c86c3e7bbfce3a739245d8f999e9946b5 DIFF: https://github.com/llvm/llvm-project/commit/5f38548c86c3e7bbfce3a739245d8f999e9946b5

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-09-02 Thread via cfe-commits
@@ -3056,26 +3045,51 @@ class IndirectGotoStmt : public Stmt { } }; -/// ContinueStmt - This represents a continue. -class ContinueStmt : public Stmt { -public: - ContinueStmt(SourceLocation CL) : Stmt(ContinueStmtClass) { -setContinueLoc(CL); +/// Base class for BreakS

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-09-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/152870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules-driver] Add initial support for driver-managed module builds (PR #156248)

2025-09-02 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/156248 >From 9760106dbd916861d396b90cc30262a13a01c9c2 Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Mon, 25 Aug 2025 02:36:42 +0200 Subject: [PATCH 1/3] [clang][modules-driver] Move logic to enable -fmodu

[clang] [Clang] Permit half precision in `__builtin_complex` (PR #156479)

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

[clang] [OpenACC] 'reduction' 'one-init' lowering, */&& operators. (PR #156122)

2025-09-02 Thread Erich Keane via cfe-commits
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation AsteriskLoc) { return BuildOpenACCAsteriskSizeExpr(AsteriskLoc); } +/// Loops through a type and generates an appropriate InitListExpr to generate +/// type initialization. +static Expr *Generat

[clang] [analyzer] Clean up bug types in CallAndMessageChecker (PR #156073)

2025-09-02 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/156073 From 1106657de8451fb77ee6e00da4d030b338c0ae48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Fri, 29 Aug 2025 19:41:22 +0200 Subject: [PATCH 1/2] [analyzer] Clean up bug types in CallAndMes

[clang] [clang] Remove written template args from implicit var tpl spec (PR #156329)

2025-09-02 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: @erichkeane, @mizvekov, @shafik https://github.com/llvm/llvm-project/pull/156329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Update BMI, BMI2 and TBM constexpr tests (PR #156260)

2025-09-02 Thread Burhan Söğüt via cfe-commits
https://github.com/bursow closed https://github.com/llvm/llvm-project/pull/156260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Diagnose use of if/else-if condition variable inside else-if/else branch(s) (PR #156436)

2025-09-02 Thread via cfe-commits
Alcaro wrote: I agree the worst case would be bad; if I'm reading things correctly, it'd be quadratic for things like ```c if (int* a = something()) return *a; else if (int* b = something()) return *b; else if (int* c = something()) return *c; else if (int* d = something()) return *d; else if (i

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

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

[clang-tools-extra] [llvm] [clang-tidy] modernize-use-std-format: Correct replacement types when signed stdint types are used, and when enums are printed in hex. #150343 (PR #155200)

2025-09-02 Thread via cfe-commits
https://github.com/DaveBrantonCTCT updated https://github.com/llvm/llvm-project/pull/155200 >From 19b4ddf6a856fdbebac19d1779c6ee83f2d682b0 Mon Sep 17 00:00:00 2001 From: Dave Branton Date: Tue, 2 Sep 2025 08:59:08 +1200 Subject: [PATCH 1/2] Correct replacement code when signed stdint types are

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-09-02 Thread Erich Keane via cfe-commits
@@ -215,6 +215,8 @@ def warn_c23_compat_case_range : Warning< DefaultIgnore, InGroup; def ext_c2y_case_range : Extension< "case ranges are a C2y extension">, InGroup; +def err_c2y_labeled_break_continue : Error< + "labeled %select{'break'|'continue'}0 is only supported in

[clang] [clang][driver] Improve warning message for complex range overrides (PR #154899)

2025-09-02 Thread Shunsuke Watanabe via cfe-commits
@@ -2730,17 +2730,38 @@ static void CollectArgsForIntegratedAssembler(Compilation &C, } } -static std::string ComplexArithmeticStr(LangOptions::ComplexRangeKind Range) { - return (Range == LangOptions::ComplexRangeKind::CX_None) - ? "" - : "-fcomple

[clang] [lldb] [lldb][Expression] Add structor variant to LLDB's function call labels (PR #149827)

2025-09-02 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/149827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][test] unsupport a test in aarch64 for aarch64 has corss toolchain build (PR #156383)

2025-09-02 Thread Wu Yingcong via cfe-commits
https://github.com/yingcong-wu updated https://github.com/llvm/llvm-project/pull/156383 >From b69df27e57cc0b0673960bc6802693df9fcc1e03 Mon Sep 17 00:00:00 2001 From: "Wu, Yingcong" Date: Tue, 2 Sep 2025 09:42:07 +0800 Subject: [PATCH 1/2] switch to llvm-objdump --- libunwind/test/eh_frame_fde

[clang] [CIR] Upstream FPToFPBuiltin ACosOp (PR #156356)

2025-09-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm with xlauko's comments addressed https://github.com/llvm/llvm-project/pull/156356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [clang][modules-driver] Move logic to enable -fmodules-driver (NFC) (PR #155450)

2025-09-02 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/155450 >From eca24f1b8504d522fc2ebcd00fd80b78045a5cc8 Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Mon, 25 Aug 2025 02:36:42 +0200 Subject: [PATCH 1/2] [clang][modules-driver] Move logic to enable -fmodu

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-09-02 Thread via cfe-commits
@@ -349,8 +349,9 @@ void IdentifierTable::AddKeywords(const LangOptions &LangOpts) { if (LangOpts.IEEE128) AddKeyword("__ieee128", tok::kw___float128, KEYALL, LangOpts, *this); - // Add the 'import' contextual keyword. + // Add the 'import' and 'module' contextual key

[clang] [clang] Make vector cast intrinsics constexpr (PR #156381)

2025-09-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (vedantjk) Changes Enable constexpr usage of vector bitcast intrinsics by changing from `__DEFAULT_FN_ATTRS*` to `__DEFAULT_FN_ATTRS*_CONSTEXPR` attributes. **Updated intrinsics:** - AVX-512 bitcast intrinsics: `_mm512_castpd_

[clang] [Clang][OpenMP] Add an additional class to hold data that will be shared between all loop transformations (PR #155849)

2025-09-02 Thread Roger Ferrer Ibáñez via cfe-commits
@@ -956,30 +956,42 @@ class OMPLoopBasedDirective : public OMPExecutableDirective { } }; +/// Common class of data shared between +/// OMPCanonicalLoopNestTransformationDirective and transformations over +/// canonical loop sequences. rofirrim wrote: I did

[libunwind] [libunwind][test] unsupport a test in aarch64 for aarch64 has corss toolchain build (PR #156383)

2025-09-02 Thread Wu Yingcong via cfe-commits
yingcong-wu wrote: Add arm as armv7 also have the cross-toolchain build(https://lab.llvm.org/buildbot/#/builders/38/builds/5190). https://github.com/llvm/llvm-project/pull/156383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [flang] [Driver][LoongArch] Enable linker relaxation by default for loongarch64 (PR #156315)

2025-09-02 Thread via cfe-commits
zhaoqi5 wrote: Should it be recorded in clang release note? https://github.com/llvm/llvm-project/pull/156315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-09-02 Thread via cfe-commits
@@ -17,13 +17,16 @@ #include "clang/AST/DeclTemplate.h" #include "clang/Basic/DiagnosticParse.h" #include "clang/Basic/StackExhaustionHandler.h" +#include "clang/Basic/TokenKinds.h" +#include "clang/Lex/ModuleLoader.h" #include "clang/Parse/RAIIObjectsForParser.h" #include "c

[clang] [llvm] [RISCV][MC] Add MC support of Zibi experimental extension (PR #127463)

2025-09-02 Thread Alexander Richardson via cfe-commits
@@ -0,0 +1,44 @@ +//===-- RISCVInstrInfoZibi.td - 'Zibi' instructions *- tablegen -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[libunwind] [libunwind] fix pc range condition check bug (PR #154902)

2025-09-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-win-x-aarch64` running on `as-builder-2` while building `libunwind` at step 12 "test-check-bolt". Full details are available at: https://lab.llvm.org/buildbot/#/builders/193/builds/10240 Here is the relevant piec

[clang] [Sema] Diagnose use of if/else-if condition variable inside else-if/else branch(s) (PR #156436)

2025-09-02 Thread via cfe-commits
Sirraide wrote: > One option would be simply ignore that - this warning applies to raw pointers > only, not even integers. It can always be expanded later, if we can think of > how. Yeah, this is pretty much what I had in mind. We could hard-code some common standard-library types too (e.g. `

[clang] e96ff45 - [clang][bytecode] Lazily create DynamicAllocator (#155831)

2025-09-02 Thread via cfe-commits
Author: Timm Baeder Date: 2025-09-02T17:57:18+02:00 New Revision: e96ff4530fa0111fccf2687a4e2a55bbe0f73554 URL: https://github.com/llvm/llvm-project/commit/e96ff4530fa0111fccf2687a4e2a55bbe0f73554 DIFF: https://github.com/llvm/llvm-project/commit/e96ff4530fa0111fccf2687a4e2a55bbe0f73554.diff L

[clang] [AArch64][FMV] Enable PAuth and BTI hardening of resolver functions (PR #141573)

2025-09-02 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: ping @atrosinenko https://github.com/llvm/llvm-project/pull/141573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Clean up bug types in CallAndMessageChecker (PR #156073)

2025-09-02 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?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. https://github.com/llvm/llvm-project/pull/156073 _

[clang] [X86] Add -fexperimental-new-constant-interpreter test coverage to the x86 scalar rotate constexpr test files (PR #156337)

2025-09-02 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/156337 Update tests to use builtin_test_helpers.h and the TEST_CONSTEXPR helper macro Partial fix for #155814 >From 5b994ec0a36c1a4a3d6b9781cde9ecea2babc664 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 1 S

[clang] [clang] Delay checking of `-fopenmp-host-ir-file-path` (PR #150124)

2025-09-02 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/20683 Here is the relev

  1   2   3   4   >