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

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

[clang] [clang-cl] Support /std:clatest (PR #147284)

2025-07-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/147284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] Support /std:clatest (PR #147284)

2025-07-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/147284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] Support /std:clatest (PR #147284)

2025-07-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/147284 >From 926fd7ce1264bd263a9fd46409ec7cc8e2d2db27 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Mon, 7 Jul 2025 07:47:54 -0400 Subject: [PATCH 1/3] [clang-cl] Support /stdc:latest cl.exe has /stdc:latest

[clang] [llvm] [RISCV] Implement Clang Builtins for XAndesPerf Extension (PR #147018)

2025-07-07 Thread Jim Lin via cfe-commits
@@ -0,0 +1,159 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple riscv32 -target-feature +xandesperf -emit-llvm %s -o - \ tclin914 wrote: Done. Thanks. https://github.com/llvm/llvm-project/pull/147018

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-07 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/142313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-07 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,728 @@ +#include "clang/Analysis/Analyses/LifetimeSafety.h" +#include "clang/AST/Decl.h" +#include "clang/AST/Expr.h" +#include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" +#include "clang/Analysis/AnalysisDeclContext.h" +#include "clang/Analysis/CFG.h" +#inc

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-07 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,728 @@ +#include "clang/Analysis/Analyses/LifetimeSafety.h" +#include "clang/AST/Decl.h" +#include "clang/AST/Expr.h" +#include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" +#include "clang/Analysis/AnalysisDeclContext.h" +#include "clang/Analysis/CFG.h" +#inc

[clang] [clang-cl] Support /std:clatest (PR #147284)

2025-07-07 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem approved this pull request. Thanks! (For my curiosity: seems the flag was added to the MSVC docs in https://github.com/MicrosoftDocs/cpp-docs/commit/0b7e40a3c5f689bcf27ec7bcba8758b5f0e39a28) https://github.com/llvm/llvm-project/pull/147284

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-07 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,508 @@ +//===- LifetimeSafety.cpp - C++ Lifetime Safety Analysis -*- C++-*-===// +// +// 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] [llvm] [RISCV] Implement Clang Builtins for XAndesPerf Extension (PR #147018)

2025-07-07 Thread Jim Lin via cfe-commits
@@ -0,0 +1,29 @@ +//==- BuiltinsRISCVXAndes.td - RISC-V Andes Builtin database -*- C++ -*-==// +// +// 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

[clang] 2bb7292 - [clang] Remove source range from CXXOperatorCallExpr (#147028)

2025-07-07 Thread via cfe-commits
Author: Haojian Wu Date: 2025-07-07T14:15:25+02:00 New Revision: 2bb72924c245e328e08dde546e5377273bd731f4 URL: https://github.com/llvm/llvm-project/commit/2bb72924c245e328e08dde546e5377273bd731f4 DIFF: https://github.com/llvm/llvm-project/commit/2bb72924c245e328e08dde546e5377273bd731f4.diff LO

[clang] [clang] Remove source range from CXXOperatorCallExpr (PR #147028)

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

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-07 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/142313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove source range from CXXOperatorCallExpr (PR #147028)

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

[clang] [llvm] [clang][OpenMP] Use DirectiveNameParser to parse directive names (PR #146779)

2025-07-07 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: Yep, missed for some reason https://github.com/llvm/llvm-project/pull/146779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclc] [llvm] [libclc] Add initial LIT tests (PR #87989)

2025-07-07 Thread Fraser Cormack via cfe-commits
@@ -1,3 +1,6 @@ -__kernel void foo(int *i) { +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s frasercrmck wrote: With #146503, clang does at least know about libclc. I've updated this PR to include that one, just to explore how this might work in CI. I've u

[clang] [libclc] [llvm] [libclc] Add initial LIT tests (PR #87989)

2025-07-07 Thread Fraser Cormack via cfe-commits
@@ -0,0 +1,57 @@ +import os + +import lit.formats +import lit.util + +from lit.llvm import llvm_config +from lit.llvm.subst import ToolSubst +from lit.llvm.subst import FindTool + +# Configuration file for the 'lit' test runner. + +# name: The name of this test suite. +config.name

[clang] [llvm] [clang][OpenMP] Use DirectiveNameParser to parse directive names (PR #146779)

2025-07-07 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/146779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-07 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 commented: > Something for future PRs: I think it would be nice to have some sort of > coverage statistics. While initially you do not aim to cover all of C++, it > would be good to know what portion of nodes are missing from the fact > generation when we run this on s

[clang] Revert "[clang][modules-driver] Add scanner to detect C++20 module presence" (PR #147286)

2025-07-07 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth approved this pull request. https://github.com/llvm/llvm-project/pull/147286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-07-07 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] [Clang] Do not mark ambiguous specialization invalid. When a s

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

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Haojian Wu (hokein) Changes This patch extends the `SourceLocation` class from 4 bytes to 8 bytes, as discussed here https://discourse.llvm.org/t/revisiting-64-bit-source-locations/86556 **Key Changes** * For now, only the lower **

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

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes This patch extends the `SourceLocation` class from 4 bytes to 8 bytes, as discussed here https://discourse.llvm.org/t/revisiting-64-bit-source-locations/86556 **Key Changes** * For now, only the lower **40 bi

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

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clangd Author: Haojian Wu (hokein) Changes This patch extends the `SourceLocation` class from 4 bytes to 8 bytes, as discussed here https://discourse.llvm.org/t/revisiting-64-bit

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-07 Thread Andrey Karlov via cfe-commits
@@ -6298,10 +6334,43 @@ static bool isImmediateSinkBlock(const CFGBlock *Blk) { // at least for now, but once we have better support for exceptions, // we'd need to carefully handle the case when the throw is being // immediately caught. - if (llvm::any_of(*Blk, [](const

[clang] [libclc] [llvm] [libclc] Add initial LIT tests (PR #87989)

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

[clang] db389bd - Revert "[clang][modules-driver] Add scanner to detect C++20 module presence" (#147286)

2025-07-07 Thread via cfe-commits
Author: Corentin Jabot Date: 2025-07-07T14:22:41+02:00 New Revision: db389bda9b28908788824febdc0ec2d802782962 URL: https://github.com/llvm/llvm-project/commit/db389bda9b28908788824febdc0ec2d802782962 DIFF: https://github.com/llvm/llvm-project/commit/db389bda9b28908788824febdc0ec2d802782962.diff

[clang] Revert "[clang][modules-driver] Add scanner to detect C++20 module presence" (PR #147286)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/147286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add alignment attr & propagate alignment through make.buffer.rsrc inst (PR #145278)

2025-07-07 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: This is still doing the target intrinsic instead of handling ptrmask first? https://github.com/llvm/llvm-project/pull/145278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [analyzer] Conversion to CheckerFamily: MallocChecker (PR #147080)

2025-07-07 Thread Donát Nagy via cfe-commits
@@ -2812,20 +2782,11 @@ void MallocChecker::HandleFunctionPtrFree(CheckerContext &C, SVal ArgVal, SourceRange Range, const Expr *FreeExpr, AllocationFa

[clang] [libclc] [llvm] [libclc] Add initial LIT tests (PR #87989)

2025-07-07 Thread Fraser Cormack via cfe-commits
@@ -215,6 +215,9 @@ void addOpenMPDeviceRTL(const Driver &D, const llvm::opt::ArgList &DriverArgs, StringRef BitcodeSuffix, const llvm::Triple &Triple, const ToolChain &HostTC); +void addOpenCLBuiltinsLib(const Driver &D, const

[clang] 7c2182a - NFC, use structured binding to simplify the code in SourceManager.cpp.

2025-07-07 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2025-07-07T16:43:46+02:00 New Revision: 7c2182a132c709316f7795197978a610a9dfdeae URL: https://github.com/llvm/llvm-project/commit/7c2182a132c709316f7795197978a610a9dfdeae DIFF: https://github.com/llvm/llvm-project/commit/7c2182a132c709316f7795197978a610a9dfdeae.diff LO

[clang] [flang] [flang] Add -fcomplex-arithmetic= option and select complex division algorithm (PR #146641)

2025-07-07 Thread Tarun Prabhu via cfe-commits
@@ -74,4 +74,26 @@ The ComplexToStandard dialect does still call into libm for some floating point math operations, however these don't have the same ABI issues as the complex libm functions. +The flang driver option `-fcomplex-arithmetic=` allows you to select whether +compl

[clang] [flang] [flang] Add -fcomplex-arithmetic= option and select complex division algorithm (PR #146641)

2025-07-07 Thread Tarun Prabhu via cfe-commits
@@ -3409,3 +3409,30 @@ StringRef tools::parseMRecipOption(clang::DiagnosticsEngine &Diags, return Out; } + +std::string tools::ComplexRangeKindToStr(LangOptions::ComplexRangeKind Range) { + switch (Range) { + case LangOptions::ComplexRangeKind::CX_Full: +return "full"

[clang] [flang] [flang] Add -fcomplex-arithmetic= option and select complex division algorithm (PR #146641)

2025-07-07 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/146641 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -fcomplex-arithmetic= option and select complex division algorithm (PR #146641)

2025-07-07 Thread Tarun Prabhu via cfe-commits
@@ -3409,3 +3409,30 @@ StringRef tools::parseMRecipOption(clang::DiagnosticsEngine &Diags, return Out; } + +std::string tools::ComplexRangeKindToStr(LangOptions::ComplexRangeKind Range) { tarunprabhu wrote: The functions in `CommonArgs.cpp` use a lower-cas

[clang] [flang] [flang] Add -fcomplex-arithmetic= option and select complex division algorithm (PR #146641)

2025-07-07 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Aside from the slight change to the function names in `CommonArgs.cpp` and an optional tweak to the documentation text, this looks good to me. Thank you for PR and the clarifications to my comments. https://github.com/llvm/llvm-projec

[clang] [OpenCL] Remove image dimensionality comments; NFC (PR #147312)

2025-07-07 Thread Sven van Haastregt via cfe-commits
https://github.com/svenvh created https://github.com/llvm/llvm-project/pull/147312 The code is correct as it aligns with the SPIR-V Specification, but the comment was incorrect. >From 1f87c184c72bfbb8eef0dcf527892c5691d35a45 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Mon, 7 Jul 2

[clang] [OpenCL] Remove image dimensionality comments; NFC (PR #147312)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sven van Haastregt (svenvh) Changes The code is correct as it aligns with the SPIR-V Specification, but the comment was incorrect. --- Full diff: https://github.com/llvm/llvm-project/pull/147312.diff 1 Files Affected: - (modified) clan

[clang] [analyzer] Conversion to CheckerFamily: MallocChecker (PR #147080)

2025-07-07 Thread Donát Nagy via cfe-commits
@@ -3028,24 +2986,10 @@ void MallocChecker::HandleLeak(SymbolRef Sym, ExplodedNode *N, if (Family.Kind == AF_Alloca) return; - std::optional CheckKind = - getCheckIfTracked(Family, true); - - if (!CheckKind) + const Leak *Frontend = getRelevantFrontendAs(Family)

[clang] [libclc] [llvm] [libclc] Add initial LIT tests (PR #87989)

2025-07-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,32 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Excep

[clang] [LifetimeSafety] Propagate loans using dataflow analysis (PR #147208)

2025-07-07 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/147208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] [Diagnostics] Simplify filenames that contain '..' (PR #143520)

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

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-07-07 Thread Lukas Döllerer via cfe-commits
Lukasdoe wrote: Option 2. is not implemented in the latest commit. We parse the branch hint section in the input section in lld, discard any functions that are not present in the output file and then write them into the output buffer. I also added a test case for the scenario of removed functi

[clang] c3c3919 - Revert "[DenseMap] Do not align pointer sentinel values (NFC) (#146595)"

2025-07-07 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2025-07-07T15:15:47+02:00 New Revision: c3c3919dc2d37d62e539376679feed7aaf799259 URL: https://github.com/llvm/llvm-project/commit/c3c3919dc2d37d62e539376679feed7aaf799259 DIFF: https://github.com/llvm/llvm-project/commit/c3c3919dc2d37d62e539376679feed7aaf799259.diff

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-07-07 Thread Lukas Döllerer via cfe-commits
https://github.com/Lukasdoe updated https://github.com/llvm/llvm-project/pull/146230 From e4b0ccd8e1ac579066c559e890c3d610bbf226fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=B6llerer?= Date: Wed, 2 Jul 2025 10:14:20 +0200 Subject: [PATCH 1/5] [LLVM][WebAssembly] Implement branch hint

[clang] 6063031 - [clang-cl] Support /std:clatest (#147284)

2025-07-07 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-07-07T09:15:23-04:00 New Revision: 60630310e9a4033f9085b3874147824d8676b8a7 URL: https://github.com/llvm/llvm-project/commit/60630310e9a4033f9085b3874147824d8676b8a7 DIFF: https://github.com/llvm/llvm-project/commit/60630310e9a4033f9085b3874147824d8676b8a7.diff

[clang] [clang-cl] Support /std:clatest (PR #147284)

2025-07-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/147284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [DenseMap] Do not align pointer sentinel values (NFC) (PR #146595)

2025-07-07 Thread Nikita Popov via cfe-commits
nikic wrote: Reverted this due to ubsan errors like: > /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/IR/ValueHandle.h:286:64: > runtime error: upcast of misaligned address 0x for type > 'llvm::BasicBlock', which requires 8 byte alignment The problem

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

2025-07-07 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. This change looks good to me. 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] [win][clang] Align scalar deleting destructors with MSABI (PR #139566)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/139566 >From 1b0b6242e5749e776f02581ba8600d853bfef322 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Mon, 12 May 2025 07:25:57 -0700 Subject: [PATCH 01/17] [win][clang] Align scalar deleting destructor

[clang] [libclc] [llvm] [libclc] Add initial LIT tests (PR #87989)

2025-07-07 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/87989 >From b41b2032fdb01bd91d32255bf22a94315b58a017 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 30 Jun 2025 10:59:02 +0100 Subject: [PATCH 01/11] [libclc] Place libclc files in clang's resource dir -

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

2025-07-07 Thread Haojian Wu via cfe-commits
hokein wrote: > I have debug the issue, seems we cannot move the __range variable check to > the start of checkExprLifetimeImpl, we may missing extending lifetime of > temporaries. Ah, that makes sense -- I missed the fact that this part of the code is also responsible for extending the objec

[clang] [win][clang] Do not inject static_assert macro definition (PR #147030)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/147030 >From 3060e6f416ea62bdf62470e6636278d736cc49d0 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Fri, 4 Jul 2025 02:50:38 -0700 Subject: [PATCH 1/4] [win][clang] Do not inject static_assert macro d

[clang] [CIR] Implement AbstractConditionalOperator for ComplexType (PR #147090)

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

[clang] [Clang] Partial implementation of support for P3074 (trivial unions) (PR #146815)

2025-07-07 Thread Barry Revzin via cfe-commits
https://github.com/brevzin edited https://github.com/llvm/llvm-project/pull/146815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8981,499 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang-tools-extra] [clang-tidy][NFC] Make global variable constexpr (PR #147301)

2025-07-07 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook created https://github.com/llvm/llvm-project/pull/147301 ```cpp static const char *AnalyzerCheckNamePrefix = "clang-analyzer-"; ``` Right now, `AnalyzerCheckNamePrefix` is global mutable state. Probably not what was intended! >From e7b9da97611b272aae38ab3e4c7ed411

[clang-tools-extra] [clang-tidy][NFC] Make global variable constexpr (PR #147301)

2025-07-07 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang-tools-extra] [clang-tidy][NFC] Make global variable constexpr (PR #147301)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Victor Chernyakin (localspook) Changes ```cpp static const char *AnalyzerCheckNamePrefix = "clang-analyzer-"; ``` Right now, `AnalyzerCheckNamePrefix` is global mutable state. Probably not what was intended! --- Full diff: htt

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-07-07 Thread Paul Heidekrüger via cfe-commits
paulhdk wrote: > This looks basically done, thanks for sticking with it Thanks so much for taking another look, @5chmidti! I ran into some questions; see the comments I left above. https://github.com/llvm/llvm-project/pull/95220 ___ cfe-commits mailin

[clang] [Clang] Partial implementation of support for P3074 (trivial unions) (PR #146815)

2025-07-07 Thread Barry Revzin via cfe-commits
@@ -9543,6 +9543,48 @@ bool SpecialMemberDeletionInfo::shouldDeleteForSubobjectCall( if (DiagKind == -1) return false; + if (this->S.Context.getLangOpts().CPlusPlus26 && inUnion() && + CSM == CXXSpecialMemberKind::Destructor) { +// [class.dtor]/7 In C++26, a d

[clang] [win][clang] Do not inject static_assert macro definition (PR #147030)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -1450,7 +1450,6 @@ def MicrosoftAnonTag : DiagGroup<"microsoft-anon-tag">; def MicrosoftCommentPaste : DiagGroup<"microsoft-comment-paste">; def MicrosoftEndOfFile : DiagGroup<"microsoft-end-of-file">; def MicrosoftInaccessibleBase : DiagGroup<"microsoft-inaccessible-base">;

[clang] [win][clang] Align scalar deleting destructors with MSABI (PR #139566)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ping @tahonermann https://github.com/llvm/llvm-project/pull/139566 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [win][clang] Align scalar deleting destructors with MSABI (PR #139566)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -46,6 +46,22 @@ Potentially Breaking Changes ``endbr64`` instruction at the labels named as possible branch destinations, so it is not safe to use a register-controlled branch instruction to branch to one. (In line with gcc.) +- Scalar deleting destructor support has b

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

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8981,499 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

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

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8981,499 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

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

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8981,499 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

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

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8981,499 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

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

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8695,6 +8730,106 @@ SDValue SystemZTargetLowering::combineSETCC( } static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { + // CCMask for ICmp is equal to 0, 1, 2 or 3. + const auto CCMaskForICmpEQCCVal = [](unsigned CC) { +assert(CC < 4 && "CC out of

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

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8981,499 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

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

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8958,483 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

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

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8728,9 +8928,9 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { auto *FalseVal = dyn_cast(CompareLHS->getOperand(1)); if (!FalseVal) return false; -if (CompareRHS->getAPIntValue() == FalseVal->getAPIntValue()) +if (CompareRHS-

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

2025-07-07 Thread Ulrich Weigand via cfe-commits
@@ -8695,6 +8730,106 @@ SDValue SystemZTargetLowering::combineSETCC( } static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { + // CCMask for ICmp is equal to 0, 1, 2 or 3. + const auto CCMaskForICmpEQCCVal = [](unsigned CC) { +assert(CC < 4 && "CC out of

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

2025-07-07 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand commented: Once again not a full review, but comments on the combiner changes. https://github.com/llvm/llvm-project/pull/125970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

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

2025-07-07 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/125970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Add errors for incorrect CUDA addrpaces (PR #138706)

2025-07-07 Thread Lewis Crawford via cfe-commits
https://github.com/LewisCrawford closed https://github.com/llvm/llvm-project/pull/138706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Add errors for incorrect CUDA addrpaces (PR #138706)

2025-07-07 Thread Lewis Crawford via cfe-commits
LewisCrawford wrote: I think it might be best to just close this, and leave it to front-ends to validate instead of adding IR-level validation, as it would make certain IR-level tests a lot more inconvenient to write. The chances of someone hitting problems from using invalid address-spaces li

[clang] [Clang] accept @tparam on variable template partial specializations (PR #147219)

2025-07-07 Thread Aaron Ballman via cfe-commits
@@ -291,6 +291,14 @@ void DeclInfo::fill() { TemplateParameters = CTPSD->getTemplateParameters(); break; } + case Decl::VarTemplatePartialSpecialization: { +const VarTemplatePartialSpecializationDecl *VTPSD = AaronBallman wrote: ```suggestion

[clang] [Clang] accept @tparam on variable template partial specializations (PR #147219)

2025-07-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, with a small nit. (Feel free to land once addressed, additional review not required.) https://github.com/llvm/llvm-project/pull/147219 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [Clang] accept @tparam on variable template partial specializations (PR #147219)

2025-07-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/147219 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1a1a11f - [clang][OpenMP] Issue a warning when parsing future directive spelling (#146933)

2025-07-07 Thread via cfe-commits
Author: Krzysztof Parzyszek Date: 2025-07-07T08:47:53-05:00 New Revision: 1a1a11f7096d7ff95bd192ded276459adae04159 URL: https://github.com/llvm/llvm-project/commit/1a1a11f7096d7ff95bd192ded276459adae04159 DIFF: https://github.com/llvm/llvm-project/commit/1a1a11f7096d7ff95bd192ded276459adae04159

[clang] [llvm] [clang] Avoid printing overly large integer/_BitInt numbers in static assertion failure diagnostics #71675 (PR #145053)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -2164,6 +2164,13 @@ void APInt::fromString(unsigned numbits, StringRef str, uint8_t radix) { void APInt::toString(SmallVectorImpl &Str, unsigned Radix, bool Signed, bool formatAsCLiteral, bool UpperCase, bool InsertSeparators) const

[clang] [llvm] [clang] Avoid printing overly large integer/_BitInt numbers in static assertion failure diagnostics #71675 (PR #145053)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -2278,8 +2285,28 @@ void APInt::toString(SmallVectorImpl &Str, unsigned Radix, bool Signed, } } else { int Pos = 0; +// The value of cutOffSize is not special, it is just a number of +// characters that gives us enough info without losing readability. +

[clang] [llvm] [clang] Avoid printing overly large integer/_BitInt numbers in static assertion failure diagnostics #71675 (PR #145053)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -647,7 +647,11 @@ Improvements to Clang's diagnostics #GH69470, #GH59391, #GH58172, #GH46215, #GH45915, #GH45891, #GH44490, #GH36703, #GH32903, #GH23312, #GH69874. - +- Improved the performance of static assertions involving large integers by + using hex format inste

[clang-tools-extra] [clang-tidy] added `RespectOpaqueTypes` option to `readability-qualified-auto check` (PR #147060)

2025-07-07 Thread via cfe-commits
@@ -347,6 +347,11 @@ Changes in existing checks ` check by fixing some false positives involving smart pointers to arrays. +- Improved :doc:`readability-qualified-auto EugeneZelenko wrote: Please merge with existing `readability-qualified-auto` entry. ht

[clang] [llvm] [clang] Avoid printing overly large integer/_BitInt numbers in static assertion failure diagnostics #71675 (PR #145053)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -647,7 +647,11 @@ Improvements to Clang's diagnostics #GH69470, #GH59391, #GH58172, #GH46215, #GH45915, #GH45891, #GH44490, #GH36703, #GH32903, #GH23312, #GH69874. - +- Improved the performance of static assertions involving large integers by + using hex format inste

[clang] [llvm] [clang] Avoid printing overly large integer/_BitInt numbers in static assertion failure diagnostics #71675 (PR #145053)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -87,12 +87,12 @@ typedef unsigned __int128 uint128_t; static const __uint128_t UINT128_MAX =__uint128_t(__int128_t(-1L)); static_assert(UINT128_MAX == -1, ""); static_assert(UINT128_MAX == 1, ""); // both-error {{static assertion failed}} \ -

[clang] [llvm] [clang] Avoid printing overly large integer/_BitInt numbers in static assertion failure diagnostics #71675 (PR #145053)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -2278,8 +2285,28 @@ void APInt::toString(SmallVectorImpl &Str, unsigned Radix, bool Signed, } } else { int Pos = 0; +// The value of cutOffSize is not special, it is just a number of +// characters that gives us enough info without losing readability. +

[clang] [llvm] [clang] Avoid printing overly large integer/_BitInt numbers in static assertion failure diagnostics #71675 (PR #145053)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -2278,8 +2285,28 @@ void APInt::toString(SmallVectorImpl &Str, unsigned Radix, bool Signed, } } else { int Pos = 0; +// The value of cutOffSize is not special, it is just a number of +// characters that gives us enough info without losing readability. +

[clang] [llvm] [clang][OpenMP] Issue a warning when parsing future directive spelling (PR #146933)

2025-07-07 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz closed https://github.com/llvm/llvm-project/pull/146933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Make `bugprone-unhandled-self-assignment` check more general (PR #147066)

2025-07-07 Thread via cfe-commits
@@ -189,6 +189,12 @@ Changes in existing checks calls of ``std::string`` constructor with char pointer, start position and length parameters. +- Improved :doc:`bugprone-unhandled-self-assignment EugeneZelenko wrote: Should be after `bugprone-unchecked-opt

[clang] [NFC][clang] Fix CodeGenSYCL::unique_stable_name_windows_diff test (PR #146854)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/146854 >From 9a640eefb5d27a65f236b5f7df1398bdf1bcc017 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Thu, 3 Jul 2025 03:46:41 -0700 Subject: [PATCH 1/3] [NFC][clang] Fix CodeGenSYCL::unique_stable_nam

[clang] [NFC][clang] Fix CodeGenSYCL::unique_stable_name_windows_diff test (PR #146854)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon ready_for_review https://github.com/llvm/llvm-project/pull/146854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang] Fix CodeGenSYCL::unique_stable_name_windows_diff test (PR #146854)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/146854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-07-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/147303 So we run the destructor. >From c567da7e6be38496e428015af6fb2a5daf60b450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 7 Jul 2025 15:48:14 +0200 Subject: [PATCH] [clang][bytecode] Cre

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

2025-07-07 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/147163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DTLTO][Clang] Add support for Integrated Distributed ThinLTO (PR #147265)

2025-07-07 Thread via cfe-commits
https://github.com/bd1976bris created https://github.com/llvm/llvm-project/pull/147265 This patch introduces support for Integrated Distributed ThinLTO (DTLTO) in Clang. DTLTO enables the distribution of ThinLTO backend compilations via external distribution systems, such as Incredibuild, dur

[clang] [libcxx] [libc++][Clang] Added explanation why is_constructible evaluated to false. Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-07-07 Thread Shamshura Egor via cfe-commits
egorshamshura wrote: @cor3ntin it seems that it is possible to merge https://github.com/llvm/llvm-project/pull/144220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   >