[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-10-17 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb edited https://github.com/llvm/llvm-project/pull/111499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-10-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` running on `systemz-1` while building `clang,lldb,llvm` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/3573 Here is the relevant piece of the bu

[clang-tools-extra] [clang-tidy] insert ``static`` keyword in correct position for misc-use-internal-linkage (PR #108792)

2024-10-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/108792 >From 795b3ae677210ff50f7710a0cf73d435889b68ae Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 16 Sep 2024 13:47:10 +0800 Subject: [PATCH 1/3] [clang-tidy] insert ``static`` keyword in correct positi

[clang] [flang] [flang][driver] Make -stdlib= option visible to flang and silently ignored by it (PR #110598)

2024-10-17 Thread Michael Kruse via cfe-commits
Meinersbur wrote: > I don’t personally think that the flang driver should ever attempt to link a > C++ library of any kind. FWIW while there’s no stdlib option to consider in > their case, g++ will never auto link the gfortran runtimes and gfortran will > never auto link libstdc++ gfortran do

[clang] [analyzer] Improve solver (PR #112583)

2024-10-17 Thread Donát Nagy via cfe-commits
@@ -2866,12 +2877,14 @@ ConditionTruthVal RangeConstraintManager::checkNull(ProgramStateRef State, const llvm::APSInt *RangeConstraintManager::getSymVal(ProgramStateRef St, SymbolRef Sym) const { - const RangeSet *T = get

[clang] [analyzer] Improve solver (PR #112583)

2024-10-17 Thread Donát Nagy via cfe-commits
@@ -1485,6 +1487,18 @@ class SymbolicRangeInferrer Sym->getType()); } + std::optional getRangeCommutativeSymSym(const SymSymExpr *SSE) { +bool IsCommutative = llvm::is_contained({BO_Add, BO_Mul}, SSE->getOpcode()); +if (!IsCommutative) + return std::nu

[clang] [analyzer] Improve solver (PR #112583)

2024-10-17 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/112583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Improve solver (PR #112583)

2024-10-17 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. LGTM overall, see inline remarks for details. https://github.com/llvm/llvm-project/pull/112583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [analyzer] Improve solver (PR #112583)

2024-10-17 Thread Donát Nagy via cfe-commits
@@ -50,28 +50,17 @@ void test2() { b = d; a -= d; + clang_analyzer_warnIfReached(); // expected-warning {{REACHABLE}} + if (a != 0) return; - clang_analyzer_warnIfReached(); // expected-warning{{REACHABLE}} - - /* The BASELINE passes these checks ('wrning' is

[clang] [analyzer] Improve solver (PR #112583)

2024-10-17 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat requested changes to this pull request. (The "approve mark" was accidental, this should not be merged without fixing the trivial mistake that hardcodes addition.) https://github.com/llvm/llvm-project/pull/112583 ___ cfe-co

[clang] 375690c - clang/HIP: Remove REQUIRES libgcc from a test (#112412)

2024-10-17 Thread via cfe-commits
Author: Matt Arsenault Date: 2024-10-17T13:15:12+04:00 New Revision: 375690c0a1a1caacad1bbd243a611ae5c2970996 URL: https://github.com/llvm/llvm-project/commit/375690c0a1a1caacad1bbd243a611ae5c2970996 DIFF: https://github.com/llvm/llvm-project/commit/375690c0a1a1caacad1bbd243a611ae5c2970996.diff

[clang] clang/HIP: Remove REQUIRES libgcc from a test (PR #112412)

2024-10-17 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/112412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 77ea619 - clang/HIP: Remove REQUIRES windows from a test (#112411)

2024-10-17 Thread via cfe-commits
Author: Matt Arsenault Date: 2024-10-17T13:17:10+04:00 New Revision: 77ea619bc6cdcdf734105e0c96c92e060aadc011 URL: https://github.com/llvm/llvm-project/commit/77ea619bc6cdcdf734105e0c96c92e060aadc011 DIFF: https://github.com/llvm/llvm-project/commit/77ea619bc6cdcdf734105e0c96c92e060aadc011.diff

[clang] clang/HIP: Remove REQUIRES windows from a test (PR #112411)

2024-10-17 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/112411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MIPS] LLVM data layout give i128 an alignment of 16 for mips64 (PR #112084)

2024-10-17 Thread via cfe-commits
yingopq wrote: > This looks technically fine, but I'm having trouble finding a normative > reference for this. Is there an ABI specification for N32/N64 somewhere? > > Also, what alignment does clang use for o32 with ForceEnableInt128? > > https://github.com/llvm/llvm-project/blob/cb2f16195754

[clang] [llvm] [LLVM][MC][AArch64] Assembler support for Armv9.6-A memory systems extensions (PR #112341)

2024-10-17 Thread Nashe Mncube via cfe-commits
@@ -0,0 +1,395 @@ +# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py +// RUN: llvm-mc -triple aarch64 -mattr=+lsui -show-encoding %s | FileCheck %s nasherm wrote: Done https://github.com/llvm/llvm-project/pull/112341

[clang] [clang][bytecode] Explicitly truncate in IntegralAP::from() (PR #112683)

2024-10-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/112683 Add Integral::toAPInt(), which truncates to the given BitWidth, similar to the toAPSInt() we already have. >From eeef15e2121a4bfa520f93037b4f04eb1e3dffa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4

[clang-tools-extra] [clang-include-cleaner] Fix -Wpessimizing-move warning introduced in 4cda28c1ada702a08f6960eb4c93919187c1d4d1 (PR #112684)

2024-10-17 Thread Byoungchan Lee via cfe-commits
https://github.com/bc-lee created https://github.com/llvm/llvm-project/pull/112684 Failing log: https://lab.llvm.org/buildbot/#/builders/145/builds/2540 >From b6d67fc85457e3c374d7fc0520f593e95e2cbaec Mon Sep 17 00:00:00 2001 From: Byoungchan Lee Date: Thu, 17 Oct 2024 18:30:28 +0900 Subject: [

[clang] [clang][bytecode] Explicitly truncate in IntegralAP::from() (PR #112683)

2024-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Add Integral::toAPInt(), which truncates to the given BitWidth, similar to the toAPSInt() we already have. --- Full diff: https://github.com/llvm/llvm-project/pull/112683.diff 2 Files Affected: - (modifie

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-10-17 Thread Boaz Brickner via cfe-commits
@@ -45,10 +48,14 @@ enum LifetimeKind { /// a default member initializer), the program is ill-formed. LK_MemInitializer, - /// The lifetime of a temporary bound to this entity probably ends too soon, + /// The lifetime of a temporary bound to this entity may end too soon

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-10-17 Thread Boaz Brickner via cfe-commits
@@ -1091,21 +1104,22 @@ static bool isAssignmentOperatorLifetimeBound(CXXMethodDecl *CMD) { } static bool shouldRunGSLAssignmentAnalysis(const Sema &SemaRef, - const AssignedEntity &Entity) { +

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-17 Thread Stanislav Mekhanoshin via cfe-commits
@@ -102,20 +102,66 @@ void test_s_dcache_wb() __builtin_amdgcn_s_dcache_wb(); } -// CHECK-LABEL: @test_mov_dpp +// CHECK-LABEL: @test_mov_dpp_int // CHECK: {{.*}}call{{.*}} i32 @llvm.amdgcn.update.dpp.i32(i32 poison, i32 %src, i32 0, i32 0, i32 0, i1 false) -void test_mov_

[clang-tools-extra] [clang-include-cleaner] Fix incorrect directory issue for writing files (PR #111375)

2024-10-17 Thread kadir çetinkaya via cfe-commits
kadircet wrote: btw, LMK if you don't have commit access and I should merge this for you https://github.com/llvm/llvm-project/pull/111375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-10-17 Thread Boaz Brickner via cfe-commits
@@ -18,29 +18,42 @@ namespace clang::sema { -/// Describes an entity that is being assigned. -struct AssignedEntity { - // The left-hand side expression of the assignment. - Expr *LHS = nullptr; +struct CapturingEntity { bricknerb wrote: I think that using

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-17 Thread Stanislav Mekhanoshin via cfe-commits
@@ -102,20 +102,66 @@ void test_s_dcache_wb() __builtin_amdgcn_s_dcache_wb(); } -// CHECK-LABEL: @test_mov_dpp +// CHECK-LABEL: @test_mov_dpp_int // CHECK: {{.*}}call{{.*}} i32 @llvm.amdgcn.update.dpp.i32(i32 poison, i32 %src, i32 0, i32 0, i32 0, i1 false) -void test_mov_

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-10-17 Thread Boaz Brickner via cfe-commits
@@ -269,6 +271,40 @@ void Sema::inferLifetimeBoundAttribute(FunctionDecl *FD) { } } +static bool IsPointerLikeType(QualType QT) { + QT = QT.getNonReferenceType(); + // if (QT->isPointerType()) + // return true; + auto *RD = QT->getAsCXXRecordDecl(); + if (!RD) +re

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-17 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/112517 From 01a538fbbd93a7f26e1309c9c95d5be0c8500402 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Mon, 14 Oct 2024 11:20:55 +0200 Subject: [PATCH 1/2] [clang] Introduce diagnostics suppression mappings This i

[clang] [CLANG][AArch64]Add SVE tuple types for mfloat8_t (PR #112687)

2024-10-17 Thread via cfe-commits
https://github.com/CarolineConcatto created https://github.com/llvm/llvm-project/pull/112687 This patch adds scalable tuple types vectors for MFloat_8 type, according to the ACLE[1]. [1] https://github.com/ARM-software/acle.git >From 310e16c83e60ff64dadc27528da9b4e266d7db2e Mon Sep 17 00:00:0

[clang] [CLANG][AArch64]Add SVE tuple types for mfloat8_t (PR #112687)

2024-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: None (CarolineConcatto) Changes This patch adds scalable tuple types vectors for MFloat_8 type, according to the ACLE[1]. [1] https://github.com/ARM-software/acle.git --- Patch is 27.58 KiB, truncated to 20.00 KiB below, full ve

[clang] [clang] Reject if constexpr in C (PR #112685)

2024-10-17 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM - I think we should backport that to 19 (so we don't need a changelog) https://github.com/llvm/llvm-project/pull/112685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [AArch64][Clang][NEON] Remove undefined vcmla intrinsics (PR #112575)

2024-10-17 Thread via cfe-commits
https://github.com/SpencerAbson closed https://github.com/llvm/llvm-project/pull/112575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 53d89ef - [AArch64][Clang][NEON] Remove undefined vcmla intrinsics (#112575)

2024-10-17 Thread via cfe-commits
Author: SpencerAbson Date: 2024-10-17T11:16:06+01:00 New Revision: 53d89ef34005f4dc4f764db0c009130bb52a6a78 URL: https://github.com/llvm/llvm-project/commit/53d89ef34005f4dc4f764db0c009130bb52a6a78 DIFF: https://github.com/llvm/llvm-project/commit/53d89ef34005f4dc4f764db0c009130bb52a6a78.diff

[clang] [CLANG][AArch64]Add SVE tuple types for mfloat8_t (PR #112687)

2024-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (CarolineConcatto) Changes This patch adds scalable tuple types vectors for MFloat_8 type, according to the ACLE[1]. [1] https://github.com/ARM-software/acle.git --- Patch is 27.58 KiB, truncated to 20.00 KiB below, full version:

[clang] [clang][ASTImporter] Fix of unchecked Error object (NFC) (PR #112688)

2024-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes After a previous fix and commit 30a9cac error handling in function 'importTemplateParameterDefaultArgument' was not correct because std::move was removed from return of an Error object and this caused crash

[clang] [clang][ASTImporter] Fix of unchecked Error object (NFC) (PR #112688)

2024-10-17 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/112688 After a previous fix and commit 30a9cac error handling in function 'importTemplateParameterDefaultArgument' was not correct because std::move was removed from return of an Error object and this caused crash "E

[clang] [clang] Deduplicate the logic that only warns once when stack is almost full (PR #112552)

2024-10-17 Thread via cfe-commits
@@ -0,0 +1,45 @@ +//===--- SingleWarningStackAwareExecutor.h - A utility for warning once when +// close to out of stack space ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for lic

[clang] [clang][analyzer] Introduce MutexModeling checker (PR #111381)

2024-10-17 Thread via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: 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 comman

[clang-tools-extra] [clangd] fix extract-to-function for overloaded operators (PR #81640)

2024-10-17 Thread Christian Kandeler via cfe-commits
ckandeler wrote: Needs rebase and another typo fix. Looks good to me otherwise. https://github.com/llvm/llvm-project/pull/81640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in abs function. (PR #112539)

2024-10-17 Thread via cfe-commits
cor3ntin wrote: Please add an entry to `clang/docs/ReleaseNotes.rst`, thanks! https://github.com/llvm/llvm-project/pull/112539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5b4071c - [clang][bytecode] Explicitly truncate in IntegralAP::from() (#112683)

2024-10-17 Thread via cfe-commits
Author: Timm Baeder Date: 2024-10-17T12:26:44+02:00 New Revision: 5b4071c7554ab4feeae4817e3d41013016308586 URL: https://github.com/llvm/llvm-project/commit/5b4071c7554ab4feeae4817e3d41013016308586 DIFF: https://github.com/llvm/llvm-project/commit/5b4071c7554ab4feeae4817e3d41013016308586.diff L

[clang] [clang][bytecode] Explicitly truncate in IntegralAP::from() (PR #112683)

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

[clang] [clang] Deduplicate the logic that only warns once when stack is almost full (PR #112552)

2024-10-17 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov approved this pull request. LGTM, but please fix the comment from @cor3ntin before submitting about renaming the class https://github.com/llvm/llvm-project/pull/112552 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang-tools-extra] 4cda28c - [clang-include-cleaner] Fix incorrect directory issue for writing files (#111375)

2024-10-17 Thread via cfe-commits
Author: Byoungchan Lee Date: 2024-10-17T10:16:07+02:00 New Revision: 4cda28c1ada702a08f6960eb4c93919187c1d4d1 URL: https://github.com/llvm/llvm-project/commit/4cda28c1ada702a08f6960eb4c93919187c1d4d1 DIFF: https://github.com/llvm/llvm-project/commit/4cda28c1ada702a08f6960eb4c93919187c1d4d1.diff

[clang-tools-extra] [clang-include-cleaner] Fix incorrect directory issue for writing files (PR #111375)

2024-10-17 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/111375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenCL] Replace a CreatePointerCast call; NFC (PR #112676)

2024-10-17 Thread Sven van Haastregt via cfe-commits
https://github.com/svenvh created https://github.com/llvm/llvm-project/pull/112676 With opaque pointers, the only purpose of the cast here is to cast between address spaces, similar to the 4-argument case below. >From 7dff616c6cd8ffb2c58e26132370f9329a0bf4cd Mon Sep 17 00:00:00 2001 From: Sven

[clang] [OpenCL] Replace a CreatePointerCast call; NFC (PR #112676)

2024-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sven van Haastregt (svenvh) Changes With opaque pointers, the only purpose of the cast here is to cast between address spaces, similar to the 4-argument case below. --- Full diff: https://github.com/llvm/llvm-project/pull/112676.diff 1

[clang] [clang] Make -fveclib={ArmPL, SLEEF} imply -fno-math-errno (PR #112580)

2024-10-17 Thread Maciej Gabka via cfe-commits
@@ -36,16 +36,23 @@ /* Verify that the correct vector library is passed to LTO flags. */ // RUN: %clang -### --target=x86_64-unknown-linux-gnu -fveclib=LIBMVEC -flto %s 2>&1 | FileCheck --check-prefix=CHECK-LTO-LIBMVEC %s +// CHECK-LTO-LIBMVEC: "-fmath-errno" // CHECK-LTO-LI

[clang] [CLANG]Add Scalable vectors for mfloat8_t (PR #101644)

2024-10-17 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/101644 >From 7134302c7e1054021af36a207dbfd0c40c9e8c51 Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Fri, 2 Aug 2024 08:47:18 + Subject: [PATCH 1/3] [CLANG]Add Scalable vectors for mfloat8_t This

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-10-17 Thread Boaz Brickner via cfe-commits
@@ -3223,6 +3225,49 @@ void Sema::CheckArgAlignment(SourceLocation Loc, NamedDecl *FDecl, << ParamName << (FDecl != nullptr) << FDecl; } +void Sema::checkLifetimeCaptureBy(FunctionDecl *FD, bool IsMemberFunction, + const Expr *ThisArg,

[clang] [CLANG]Add Scalable vectors for mfloat8_t (PR #101644)

2024-10-17 Thread via cfe-commits
https://github.com/CarolineConcatto closed https://github.com/llvm/llvm-project/pull/101644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cb43021 - [CLANG]Add Scalable vectors for mfloat8_t (#101644)

2024-10-17 Thread via cfe-commits
Author: CarolineConcatto Date: 2024-10-17T09:22:55+01:00 New Revision: cb43021e5726a4462f28a999fb66a8dc20dc354b URL: https://github.com/llvm/llvm-project/commit/cb43021e5726a4462f28a999fb66a8dc20dc354b DIFF: https://github.com/llvm/llvm-project/commit/cb43021e5726a4462f28a999fb66a8dc20dc354b.di

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-10-17 Thread Boaz Brickner via cfe-commits
@@ -18,29 +18,42 @@ namespace clang::sema { -/// Describes an entity that is being assigned. -struct AssignedEntity { - // The left-hand side expression of the assignment. - Expr *LHS = nullptr; +struct CapturingEntity { + // The expression of the entity which captures ano

[clang] [llvm] [LLVM][MC][AArch64] Assembler support for Armv9.6-A memory systems extensions (PR #112341)

2024-10-17 Thread Nashe Mncube via cfe-commits
@@ -4020,6 +4079,33 @@ defm STNPD : StorePairNoAlloc<0b01, 1, FPR64Op, simm7s8, "stnp">; defm STNPQ : StorePairNoAlloc<0b10, 1, FPR128Op, simm7s16, "stnp">; } +// Armv9.6-a Load/store no-allocate pair (FEAT_LSUI) +let Predicates = [HasLSUI] in { + defm LDTP: LoadPairOffs

[clang-tools-extra] [clangd] fix extract-to-function for overloaded operators (PR #81640)

2024-10-17 Thread Christian Kandeler via cfe-commits
@@ -105,7 +105,7 @@ bool isRootStmt(const Node *N) { if (N->Selected == SelectionTree::Partial) return false; // A DeclStmt can be an unselected RootStmt since VarDecls claim the entire - // selection range in selectionTree. Additionally, an CXXOperatorCallExpr of a +

[clang] [clang] Reject if constexpr in C (PR #112685)

2024-10-17 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/112685 Fixes https://github.com/llvm/llvm-project/issues/112587 >From 6fda18661ef51185a7d24dbfb66684f55dd20f26 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Thu, 17 Oct 2024 02:55:04 -0700 Subject: [

[clang] [clang] Reject if constexpr in C (PR #112685)

2024-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mariya Podchishchaeva (Fznamznon) Changes Fixes https://github.com/llvm/llvm-project/issues/112587 --- Full diff: https://github.com/llvm/llvm-project/pull/112685.diff 2 Files Affected: - (modified) clang/lib/Parse/ParseStmt.cpp (+7-4)

[clang] [clang] Make -fveclib={ArmPL, SLEEF} imply -fno-math-errno (PR #112580)

2024-10-17 Thread Paul Walker via cfe-commits
@@ -36,16 +36,23 @@ /* Verify that the correct vector library is passed to LTO flags. */ // RUN: %clang -### --target=x86_64-unknown-linux-gnu -fveclib=LIBMVEC -flto %s 2>&1 | FileCheck --check-prefix=CHECK-LTO-LIBMVEC %s +// CHECK-LTO-LIBMVEC: "-fmath-errno" // CHECK-LTO-LI

[clang] [clang] Make -fveclib={ArmPL, SLEEF} imply -fno-math-errno (PR #112580)

2024-10-17 Thread Paul Walker via cfe-commits
@@ -3125,6 +3129,10 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, TrappingMathPresent = true; FPExceptionBehavior = "strict"; break; +case options::OPT_fveclib: + if (llvm::is_contained(VecLibImpliesNoMathErrno, A->g

[clang] [llvm] [AArch64] Introduce new armv9.6 features (PR #111677)

2024-10-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` running on `systemz-1` while building `clang,llvm` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/3579 Here is the relevant piece of the build l

[clang] [llvm] [MIPS] LLVM data layout give i128 an alignment of 16 for mips64 (PR #112084)

2024-10-17 Thread Nikita Popov via cfe-commits
nikic wrote: > @nikic I checked several other arch-32 situations with ForceEnableInt128, and > they all use `alloca i128, align 16`. But they did not modify the target > datalayout content with `i128:128`, should mips be consistent? I think either way is fine here. Something to consider though

[clang] [clang] constexpr built-in abs function. (PR #112539)

2024-10-17 Thread Timm Baeder via cfe-commits
@@ -265,6 +265,15 @@ namespace fpclassify { char classify_subnorm [__builtin_fpclassify(-1, -1, -1, +1, -1, 1.0e-38f)]; } +namespace abs { +static_assert(__builtin_abs(14) == 14, ""); +static_assert(__builtin_labs(14L) == 14L, ""); +static_assert(__builtin_llabs(14LL) == 14L

[clang] [clang] constexpr built-in abs function. (PR #112539)

2024-10-17 Thread Timm Baeder via cfe-commits
@@ -563,6 +563,19 @@ static bool interp__builtin_fabs(InterpState &S, CodePtr OpPC, return true; } +static bool interp__builtin_abs(InterpState &S, CodePtr OpPC, +const InterpFrame *Frame, const Function *Func, +

[clang-tools-extra] [clang-include-cleaner] Fix incorrect directory issue for writing files (PR #111375)

2024-10-17 Thread Byoungchan Lee via cfe-commits
bc-lee wrote: I will fix the following error within an hour (currently away from keyboard). ``` FAILED: tools/clang/tools/extra/include-cleaner/tool/CMakeFiles/clang-include-cleaner.dir/IncludeCleaner.cpp.o ccache /home/docker/llvm-external-buildbots/clang.17.0.6/bin/clang++ --gcc-toolchain=

[clang] [AArch64][Clang][NEON] Remove undefined vcmla intrinsics (PR #112575)

2024-10-17 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov approved this pull request. LGTM, cheers! https://github.com/llvm/llvm-project/pull/112575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Make -fveclib={ArmPL, SLEEF} imply -fno-math-errno (PR #112580)

2024-10-17 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: > > Have you checked the flang driver? Is it not applicable there since errno > > is not used in Flang? > > We don't support the gfortran extension for checking errno in flang and I > can't see another way of checking it portably, so I wonder if we should just > have this flag o

[clang] [clang] Deduplicate the logic that only warns once when stack is almost full (PR #112552)

2024-10-17 Thread Boaz Brickner via cfe-commits
bricknerb wrote: This pull request is a replacement for https://github.com/llvm/llvm-project/pull/112371. https://github.com/llvm/llvm-project/pull/112552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [llvm] [LLVM] Add IRNormalizer Pass (PR #68176)

2024-10-17 Thread Puyan Lotfi via cfe-commits
plotfi wrote: LGTM, I would prefer if we landed this and added improvements as needed https://github.com/llvm/llvm-project/pull/68176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-include-cleaner] Fix incorrect directory issue for writing files (PR #111375)

2024-10-17 Thread Byoungchan Lee via cfe-commits
bc-lee wrote: I don't have commit access to LLVM. Please merge this PR. Thanks! https://github.com/llvm/llvm-project/pull/111375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-10-17 Thread Boaz Brickner via cfe-commits
@@ -1091,21 +1104,22 @@ static bool isAssignmentOperatorLifetimeBound(CXXMethodDecl *CMD) { } static bool shouldRunGSLAssignmentAnalysis(const Sema &SemaRef, - const AssignedEntity &Entity) { +

[clang-tools-extra] [clang-include-cleaner] Fix -Wpessimizing-move warning introduced in 4cda28c1ada702a08f6960eb4c93919187c1d4d1 (PR #112684)

2024-10-17 Thread Byoungchan Lee via cfe-commits
bc-lee wrote: Original PR: https://github.com/llvm/llvm-project/pull/111375 https://github.com/llvm/llvm-project/pull/112684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-include-cleaner] Fix -Wpessimizing-move warning introduced in 4cda28c1ada702a08f6960eb4c93919187c1d4d1 (PR #112684)

2024-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Byoungchan Lee (bc-lee) Changes Failing log: https://lab.llvm.org/buildbot/#/builders/145/builds/2540 --- Full diff: https://github.com/llvm/llvm-project/pull/112684.diff 1 Files Affected: - (modified) clang-tools-extra/incl

[clang] b584478 - [AArch64] Introduce new armv9.6 features (#111677)

2024-10-17 Thread via cfe-commits
Author: Lukacma Date: 2024-10-17T10:43:17+01:00 New Revision: b584478e0068fd627b7f5e9f63574caab78cc56e URL: https://github.com/llvm/llvm-project/commit/b584478e0068fd627b7f5e9f63574caab78cc56e DIFF: https://github.com/llvm/llvm-project/commit/b584478e0068fd627b7f5e9f63574caab78cc56e.diff LOG:

[clang] [llvm] [AArch64] Introduce new armv9.6 features (PR #111677)

2024-10-17 Thread via cfe-commits
https://github.com/Lukacma closed https://github.com/llvm/llvm-project/pull/111677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-10-17 Thread Daniil Kovalev via cfe-commits
@@ -4207,16 +4214,31 @@ llvm::Constant *ItaniumRTTIBuilder::BuildTypeInfo( break; } - llvm::Constant *Init = llvm::ConstantStruct::getAnon(Fields); - SmallString<256> Name; llvm::raw_svector_ostream Out(Name); CGM.getCXXABI().getMangleContext().mangleCXXRTTI(Ty

[clang] 1251687 - [clang][bytecode][NFC] Remove a leftover dump call

2024-10-17 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-10-17T12:40:14+02:00 New Revision: 125168744810f4aba039208afd9ffe1d11b1 URL: https://github.com/llvm/llvm-project/commit/125168744810f4aba039208afd9ffe1d11b1 DIFF: https://github.com/llvm/llvm-project/commit/125168744810f4aba039208afd9ffe1d11b1.diff LO

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify features memtag and memtag2. (PR #112511)

2024-10-17 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: > I don't understand this distinction: why is FMV seen as user-space only? I had to clarify this with @Wilco1 and @DanielKristofKiss. My understanding is that FMV implementations which rely on ifuncs (Linux) only work in address spaces where a dynamic linker can be used. This l

[clang] [clang-format] Add basic support for C++/CLI (#27126) (PR #112689)

2024-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Calum Robinson (calumr) Changes * This only looks for ^ as a pointer/reference token, which is the main issue when trying to format C++/CLI. Obviously there's more to C++/CLI than this minor change, but it's extremely useful to be

[clang] [clang-format] Add basic support for C++/CLI (#27126) (PR #112689)

2024-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Calum Robinson (calumr) Changes * This only looks for ^ as a pointer/reference token, which is the main issue when trying to format C++/CLI. Obviously there's more to C++/CLI than this minor change, but it's extremely useful to be able t

[clang-tools-extra] [clang-include-cleaner] Fix -Wpessimizing-move warning introduced in 4cda28c1ada702a08f6960eb4c93919187c1d4d1 (PR #112684)

2024-10-17 Thread Mikael Holmén via cfe-commits
mikaelholmen wrote: Already fixed in 2954d1f7bc8f ``` [include-cleaner] Fix -Wpessimizing-move in IncludeCleaner.cpp (NFC) /llvm-project/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp:302:14: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizi

[clang] [analyzer] Improve solver (PR #112583)

2024-10-17 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/112583 >From 4bf74c7f9caf89b67e6001b601f70741c1a672cc Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Wed, 16 Oct 2024 15:52:31 +0200 Subject: [PATCH 1/5] [analyzer][Solver] Improve getSymVal and friends Instead o

[clang] [clang] constexpr built-in abs function. (PR #112539)

2024-10-17 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/112539 >From dfa1585af3f080987cbd15830c45c34bfecc1fca Mon Sep 17 00:00:00 2001 From: c8ef Date: Wed, 16 Oct 2024 01:18:13 + Subject: [PATCH 01/10] implement constexpr builtin {l}abs --- clang/include/clang/Basic/Buil

[clang] [clang] Reject if constexpr in C (PR #112685)

2024-10-17 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: e21c80ac73a9da5c86c20dbce37c9227a17ab06a https://github.com/llvm/llvm-project/actions/runs/11384260535 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-proje

[clang] [clang-format] Add basic support for C++/CLI (#27126) (PR #112689)

2024-10-17 Thread Calum Robinson via cfe-commits
calumr wrote: > How would a user specify to use CLI? getFormattingLangOpts seems to turn on MicrosoftExt and some other options by default, so I just copied that. https://github.com/llvm/llvm-project/pull/112689 ___ cfe-commits mailing list cfe-comm

[clang] [clang] Reject if constexpr in C (PR #112685)

2024-10-17 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: https://github.com/llvm/llvm-project/pull/112697 https://github.com/llvm/llvm-project/pull/112685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Improve solver (PR #112583)

2024-10-17 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/112583 >From 4bf74c7f9caf89b67e6001b601f70741c1a672cc Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Wed, 16 Oct 2024 15:52:31 +0200 Subject: [PATCH 1/7] [analyzer][Solver] Improve getSymVal and friends Instead o

[clang] [clang-format] Handle template opener/closer in braced list (PR #112494)

2024-10-17 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/112494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: NAKAMURA Takumi (chapuni) Changes This aggregates the generation of branch counter pair as `ExecCnt` and `SkipCnt`, to aggregate `CounterExpr::subtract`. At the moment: - This change preserves the behavi

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-10-17 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/112702 This aggregates the generation of branch counter pair as `ExecCnt` and `SkipCnt`, to aggregate `CounterExpr::subtract`. At the moment: - This change preserves the behavior of `llvm::EnableSingleByteCoverage`.

[clang] modified AST for SEI redemption project (PR #111705)

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

[clang] modified AST for SEI redemption project (PR #111705)

2024-10-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for this! There's a pile of comments, but most of them are trivial reworking of comments in the code. There's an outstanding question about the funding notification. The only big thing that's missing from the changes is test coverage. You sh

[clang] modified AST for SEI redemption project (PR #111705)

2024-10-17 Thread Aaron Ballman via cfe-commits
@@ -177,14 +193,34 @@ class ASTNodeTraverser if (!SQT.Quals.hasQualifiers()) return Visit(SQT.Ty); -getNodeDelegate().AddChild([=] { +// SEI: changed from default label to "qualTypeDetail" +getNodeDelegate().AddChild("qualTypeDetail", [this, T] { g

[libcxx] [libcxxabi] [libunwind] [CMake] Handle multiple flags in ADDITIONAL_COMPILE_FLAGS properly (PR #112703)

2024-10-17 Thread Stephanos Ioannidis via cfe-commits
https://github.com/stephanosio created https://github.com/llvm/llvm-project/pull/112703 When multiple space-separated compile flags are specified in an `ADDITIONAL_COMPILE_FLAGS` cache string, the resulting flags are enclosed by double quotes because `ADDITIONAL_COMPILE_FLAGS` is a string (i.e

[clang] modified AST for SEI redemption project (PR #111705)

2024-10-17 Thread Aaron Ballman via cfe-commits
@@ -87,13 +100,44 @@ void JSONNodeDumper::Visit(const Type *T) { T->containsUnexpandedParameterPack()); attributeOnlyIfTrue("isImported", T->isFromAST()); InnerTypeVisitor::Visit(T); + // SEI + VisitQualTypeDetails(T->getCanonicalTypeInternal()); }

[clang] modified AST for SEI redemption project (PR #111705)

2024-10-17 Thread Aaron Ballman via cfe-commits
@@ -183,6 +199,12 @@ class TextNodeDumper void Visit(TypeLoc); + // SEI: added support for getting ReturnType information + void VisitReturnType(QualType T); + + // SEI: added support for more QT details. it's a passthrough for this class + void VisitQualTypeDetails(Qua

[clang] modified AST for SEI redemption project (PR #111705)

2024-10-17 Thread Aaron Ballman via cfe-commits
@@ -111,6 +155,64 @@ void JSONNodeDumper::Visit(TypeLoc TL) { [TL, this] { writeSourceRange(TL.getSourceRange()); }); } +void JSONNodeDumper::VisitQualTypeDetails(QualType T) { + // SEI: get more detailed info on type. this info is not transferrable + /

[clang] modified AST for SEI redemption project (PR #111705)

2024-10-17 Thread Aaron Ballman via cfe-commits
@@ -1346,6 +1460,8 @@ void JSONNodeDumper::VisitDeclRefExpr(const DeclRefExpr *DRE) { case NOUR_Discarded: JOS.attribute("nonOdrUseReason", "discarded"); break; } attributeOnlyIfTrue("isImmediateEscalating", DRE->isImmediateEscalating()); + // SEI: this doesn't call Vis

[clang] modified AST for SEI redemption project (PR #111705)

2024-10-17 Thread Aaron Ballman via cfe-commits
@@ -87,13 +100,44 @@ void JSONNodeDumper::Visit(const Type *T) { T->containsUnexpandedParameterPack()); attributeOnlyIfTrue("isImported", T->isFromAST()); InnerTypeVisitor::Visit(T); + // SEI + VisitQualTypeDetails(T->getCanonicalTypeInternal()); }

[clang] modified AST for SEI redemption project (PR #111705)

2024-10-17 Thread Aaron Ballman via cfe-commits
@@ -11,6 +11,22 @@ // similar to RecursiveASTVisitor. // //===--===// +// +// Modifications to this file by SEI staff are copyright Carnegie Mellon +// University and contributed under the Apache License v2.0

[clang] modified AST for SEI redemption project (PR #111705)

2024-10-17 Thread Aaron Ballman via cfe-commits
@@ -177,14 +193,34 @@ class ASTNodeTraverser if (!SQT.Quals.hasQualifiers()) return Visit(SQT.Ty); -getNodeDelegate().AddChild([=] { +// SEI: changed from default label to "qualTypeDetail" AaronBallman wrote: ```suggestion ``` We don't add c

[clang] modified AST for SEI redemption project (PR #111705)

2024-10-17 Thread Aaron Ballman via cfe-commits
@@ -177,14 +193,34 @@ class ASTNodeTraverser if (!SQT.Quals.hasQualifiers()) return Visit(SQT.Ty); -getNodeDelegate().AddChild([=] { +// SEI: changed from default label to "qualTypeDetail" +getNodeDelegate().AddChild("qualTypeDetail", [this, T] { g

  1   2   3   4   5   6   >