[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/135169 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/135169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Fix a false-positive with tentative defn compat (PR #139738)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes C++ has a carve-out that makes a declaration with 'extern' explicitly specified and no initializer be a declaration rather than a definition. We now account for that to silence a diagnostic with: ```

[clang] [C] Fix a false-positive with tentative defn compat (PR #139738)

2025-05-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/139738 C++ has a carve-out that makes a declaration with 'extern' explicitly specified and no initializer be a declaration rather than a definition. We now account for that to silence a diagnostic with: ``` ext

[clang] [Clang] Fix Sema::checkArgCount for 0-arg functions (PR #139638)

2025-05-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I have no idea how to check the range for the diagnostic here, and I don't > think we actually have a way? `-fdiagnostics-print-source-range-info` I believe? https://github.com/llvm/llvm-project/pull/139638 ___ cfe-commits maili

[clang] [C] Add -Wtentative-definition-compat (PR #137967)

2025-05-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I posted a fix: https://github.com/llvm/llvm-project/pull/139738 https://github.com/llvm/llvm-project/pull/137967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,286 @@ +#!/usr/bin/env python3 +# A tool to automatically generate documentation for the config options of the +# clang static analyzer by reading `AnalyzerOptions.def`. + +import argparse +from collections import namedtuple +from enum import Enum, auto +import re +impo

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > Sorry for my delay. I missed the review request. No problem, happens with anyone :smile: https://github.com/llvm/llvm-project/pull/135169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [Clang] Add a builtin for efficient type deduplication (PR #139730)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ilya Biryukov (ilya-biryukov) Changes Deduplicating types via standard C++ can be a huge compile-time hog, we have observed that on some of the large targets we have internally this can be up to 25%. This builtin can be used to improve c

[clang] [C] Fix a false-positive with tentative defn compat (PR #139738)

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

[clang] [Clang] Remove workaround for libstdc++4.7 (PR #139693)

2025-05-13 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/139693 We document libstdc++4.8 as the minimum supported version, and we carried a hack for `include/tr1/hashtable.h` fixed in 4.7. Cleanup some libstdc++ compatibility comments. Rate limit ·

[clang] [Clang] Remove workaround for libstdc++4.7 (PR #139693)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes We document libstdc++4.8 as the minimum supported version, and we carried a hack for `include/tr1/hashtable.h` fixed in 4.7. Cleanup some libstdc++ compatibility comments. --- Full diff: https://github.com/llv

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

2025-05-13 Thread Fraser Cormack via cfe-commits
@@ -831,6 +832,14 @@ of different sizes and signs is forbidden in binary and ternary builtins. semantics, see `LangRef

[clang] 83ce8a4 - [clang][bytecode] Get BuiltinID from the direct callee (#139675)

2025-05-13 Thread via cfe-commits
Author: Timm Baeder Date: 2025-05-13T11:11:47+02:00 New Revision: 83ce8a44bb7ec52a20fea1f2eb28c7756f46786b URL: https://github.com/llvm/llvm-project/commit/83ce8a44bb7ec52a20fea1f2eb28c7756f46786b DIFF: https://github.com/llvm/llvm-project/commit/83ce8a44bb7ec52a20fea1f2eb28c7756f46786b.diff L

[clang] [clang][bytecode] Get BuiltinID from the direct callee (PR #139675)

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

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -64,9 +65,9 @@ class CheckerFn { Func Fn; public: - CheckerBase *Checker; + CheckerBackend *Checker; - CheckerFn(CheckerBase *checker, Func fn) : Fn(fn), Checker(checker) {} + CheckerFn(CheckerBackend *checker, Func fn) : Fn(fn), Checker(checker) {}

[clang] [HIP] change default offload archs (PR #139281)

2025-05-13 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: The main obstacle of letting clang emit error when `--offload-arch` is not specified is HIP apps using hipcc as CMAKE_CXX_COMPILER. hipcc adds -xhip by default for .cpp programs. This is a known and long existing issue. Another option is to have multiple `--offload-arch` option

[clang] [llvm] Add support for Windows hot-patching (PR #138972)

2025-05-13 Thread Hans Wennborg via cfe-commits
zmodem wrote: This is very interesting! Initially I also assumed this was about Edit&Continue. As users may have the same idea, I'd suggest adding `DocBrief`s to the new Clang options, and a comment at the top of llvm/lib/CodeGen/WindowsHotPatch.cpp that explain in more detail what they do.

[clang] [HIP] change default offload archs (PR #139281)

2025-05-13 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > The main obstacle of letting clang emit error when `--offload-arch` is not > specified is HIP apps using hipcc as CMAKE_CXX_COMPILER. hipcc adds -xhip by > default for .cpp programs. This is a known and long existing issue. > > Another option is to have multiple `--offload-arc

[clang] [C] Add -Wtentative-definition-compat (PR #137967)

2025-05-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Good catch, that looks like a bug to me, it'd be worth reporting it so we have a record. https://github.com/llvm/llvm-project/pull/137967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-05-13 Thread Jonas Hahnfeld via cfe-commits
@@ -367,12 +367,6 @@ bool RedeclarableTemplateDecl::loadLazySpecializationsImpl( if (!ExternalSource) return false; - // If TPL is not null, it implies that we're loading specializations for - // partial templates. We need to load all specializations in such cases. -

[clang] [NFC][Clang] Adopt `TrailingObjects` convenience API in MacroArgs (PR #139635)

2025-05-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/139635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 726d2cf - [NFC][Clang] Adopt `TrailingObjects` convenience API in MacroArgs (#139635)

2025-05-13 Thread via cfe-commits
Author: Rahul Joshi Date: 2025-05-13T06:02:48-07:00 New Revision: 726d2cf01402e8da9b271008dd10106da45d16ac URL: https://github.com/llvm/llvm-project/commit/726d2cf01402e8da9b271008dd10106da45d16ac DIFF: https://github.com/llvm/llvm-project/commit/726d2cf01402e8da9b271008dd10106da45d16ac.diff L

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/139256 From 3bead14691a29482705c76951eaed176bfbfc996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 8 May 2025 18:46:41 +0200 Subject: [PATCH 1/3] [analyzer][NFC] Introduce framework for chec

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-05-13 Thread Jeremy Morse via cfe-commits
@@ -1816,6 +1816,15 @@ class CodeGenModule : public CodeGenTypeCache { void requireVectorDestructorDefinition(const CXXRecordDecl *RD); bool classNeedsVectorDestructor(const CXXRecordDecl *RD); + // Helper to get the alignment for a variable. + unsigned getGlobalVarAlign

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-05-13 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse commented: On the whole this looks fine to me with a final nit https://github.com/llvm/llvm-project/pull/130255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-05-13 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/130255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4ee6f74 - [NFC][Clang] Adopt `TrailingObjects` API to build ArrayRef (#139639)

2025-05-13 Thread via cfe-commits
Author: Rahul Joshi Date: 2025-05-13T06:04:11-07:00 New Revision: 4ee6f74e5540d634199a2cbf1602fdf5cff69330 URL: https://github.com/llvm/llvm-project/commit/4ee6f74e5540d634199a2cbf1602fdf5cff69330 DIFF: https://github.com/llvm/llvm-project/commit/4ee6f74e5540d634199a2cbf1602fdf5cff69330.diff L

[clang] [HIP] change default offload archs (PR #139281)

2025-05-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > The main obstacle of letting clang emit error when `--offload-arch` is not > > specified is HIP apps using hipcc as CMAKE_CXX_COMPILER. hipcc adds -xhip > > by default for .cpp programs. This is a known and long existing issue. > > Another option is to have multiple `--offloa

[clang] [NFC][Clang] Adopt `TrailingObjects` API to build ArrayRef (PR #139639)

2025-05-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/139639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Balazs Benics via cfe-commits
@@ -56,11 +54,11 @@ static const Expr *getDenomExpr(const ExplodedNode *N) { void DivZeroChecker::reportBug(StringRef Msg, ProgramStateRef StateZero, CheckerContext &C) const { - if (!isPartEnabled(DivideZeroChecker)) + if (!DivideZeroChecker.i

[clang-tools-extra] include-cleaner: Report function decls from __cleanup__ as used (PR #138669)

2025-05-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, sorry for missing this! https://github.com/llvm/llvm-project/pull/138669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-13 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/139369 >From eb15367085a381955140982177e95ad94a645e92 Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Mon, 12 May 2025 13:19:06 +0800 Subject: [PATCH 1/2] [RISCV][MC] Add support for Q extension --- .../Driv

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-13 Thread Iris Shi via cfe-commits
@@ -599,6 +599,13 @@ void RISCVInstrInfo::copyPhysReg(MachineBasicBlock &MBB, return; } + if (RISCV::FPR128RegClass.contains(DstReg, SrcReg)) { el-ev wrote: I missed it. Removed. https://github.com/llvm/llvm-project/pull/139369 ___

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-05-13 Thread Daan De Meyer via cfe-commits
DaanDeMeyer wrote: > I would expect that file extensions be sorted regardless. For example: > > ``` > #include "a.h" > #include "a.inc" > #include "a-util.def" > #include "a-util.h" > ``` Addressed https://github.com/llvm/llvm-project/pull/137840 ___

[clang-tools-extra] [include-cleaner] Use heterogeneous lookups (NFC) (PR #139685)

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

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-05-13 Thread Iris Shi via cfe-commits
@@ -247,8 +248,21 @@ void CIRGenModule::emitGlobalFunctionDefinition(clang::GlobalDecl gd, "function definition with a non-identifier for a name"); return; } - cir::FuncType funcType = - cast(convertType(funcDecl->getType())); + + cir::FuncType funcTy

[clang-tools-extra] [include-cleaner] Use heterogeneous lookups (NFC) (PR #139685)

2025-05-13 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/139685 Heterogenous lookups allow us to call find with StringRef, avoiding a temporary heap allocation of std::string. >From 9615232d9257d6d263d40656f2947d281848046e Mon Sep 17 00:00:00 2001 From: Kazu Hirata

[clang] [Cygwin] Export global symbols, template instantiations, RTTI and VTable are exported correctly (PR #138773)

2025-05-13 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: Thanks, the changes look good to me. However, as this is already neatly split into three separate commits, it would be nice to retain that separation after merging. The llvm github repo is configured to only do "squash and merge", so to retain the separation, it would have to b

[clang] [C] Add -Wtentative-definition-compat (PR #137967)

2025-05-13 Thread via cfe-commits
asmok-g wrote: @AaronBallman Is it meant that the following fires the warning, because it doesn't look wrong to me: ``` struct X{}; extern const struct X x; const struct X x = {}; ``` [Here](https://en.cppreference.com/w/c/language/extern) I see: ``` Tentative definitions A tentative definition

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/139256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Balazs Benics via cfe-commits
@@ -3411,12 +3411,12 @@ PathSensitiveBugReporter::generateDiagnosticForConsumerMap( } void BugReporter::EmitBasicReport(const Decl *DeclWithIssue, - const CheckerBase *Checker, StringRef Name, + const CheckerFr

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-05-13 Thread Iris Shi via cfe-commits
@@ -233,6 +233,19 @@ int f8(int *p) { // OGCG: %[[P2:.*]] = load ptr, ptr %[[P_PTR]], align 8 // OGCG: %[[STAR_P:.*]] = load i32, ptr %[[P2]], align 4 + +void f9() {} el-ev wrote: call to variadic function is NYI https://github.com/llvm/llvm-project/pull

[clang] [Clang][Sema] Disable checking invalid template id in initializer of primary variable template `std::format_kind` with libstdc++ (PR #139560)

2025-05-13 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/139560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-05-13 Thread Iris Shi via cfe-commits
https://github.com/el-ev edited https://github.com/llvm/llvm-project/pull/136854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move (fast) length & distance to CLC library (PR #139701)

2025-05-13 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/139701 This commit also refactors how geometric builtins are defined and declared, by sharing more helpers. It also removes an unnecessary gentype-like helper in favour of the more complete math/gentype.inc. Ther

[libclc] [libclc] Move (fast) length & distance to CLC library (PR #139701)

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

[libclc] [libclc] Move (fast) length & distance to CLC library (PR #139701)

2025-05-13 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,60 @@ +//===--===// +// +// 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: Apac

[libclc] [libclc] Move (fast) length & distance to CLC library (PR #139701)

2025-05-13 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions inc,cl,h -- libclc/clc/include/clc/geometric/binary_decl.inc

[libclc] [libclc] Move (fast) length & distance to CLC library (PR #139701)

2025-05-13 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/139701 >From 0b08b0e3fe0befc2c10b66bd4c8efdab0f805e1a Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 14 Apr 2025 10:06:08 +0100 Subject: [PATCH 1/2] [libclc] Move (fast) length & distance to CLC library

[libclc] [libclc] Move (fast) length & distance to CLC library (PR #139701)

2025-05-13 Thread Fraser Cormack via cfe-commits
@@ -0,0 +1,60 @@ +//===--===// +// +// 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: Apac

[libclc] [libclc] Move logb/ilogb to CLC library; optimize (PR #128028)

2025-05-13 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. I still think this should be fixed to be in terms of frexp utilities but this is just moving it anyway and that's separate https://github.com/llvm/llvm-project/pull/128028 ___ cfe-commits mailing

[clang] 7866c40 - Fix crash with invalid member function param list (#139595)

2025-05-13 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-05-13T06:31:10-04:00 New Revision: 7866c4091eb3badd8e0f145a200c8a3d11849ef5 URL: https://github.com/llvm/llvm-project/commit/7866c4091eb3badd8e0f145a200c8a3d11849ef5 DIFF: https://github.com/llvm/llvm-project/commit/7866c4091eb3badd8e0f145a200c8a3d11849ef5.diff

[clang] Fix crash with invalid member function param list (PR #139595)

2025-05-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/139595 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[libclc] [libclc] Move (fast) length & distance to CLC library (PR #139701)

2025-05-13 Thread Matt Arsenault via cfe-commits
@@ -43,7 +43,9 @@ _CLC_OVERLOAD _CLC_DEF __CLC_SCALAR_GENTYPE __clc_length(__CLC_GENTYPE p) { if (l2 < __CLC_GENTYPE_MIN) { p *= __CLC_GENTYPE_MIN_SCALE_UP; return __clc_sqrt(__clc_dot(p, p)) * __CLC_GENTYPE_MIN_SCALE_DOWN; - } else if (l2 == INFINITY) { + } + + i

[clang] Fix crash with invalid member function param list (PR #139595)

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

[libclc] [libclc] Move (fast) length & distance to CLC library (PR #139701)

2025-05-13 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/139701 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sa

[libclc] [libclc] Move (fast) length & distance to CLC library (PR #139701)

2025-05-13 Thread Fraser Cormack via cfe-commits
@@ -43,7 +43,9 @@ _CLC_OVERLOAD _CLC_DEF __CLC_SCALAR_GENTYPE __clc_length(__CLC_GENTYPE p) { if (l2 < __CLC_GENTYPE_MIN) { p *= __CLC_GENTYPE_MIN_SCALE_UP; return __clc_sqrt(__clc_dot(p, p)) * __CLC_GENTYPE_MIN_SCALE_DOWN; - } else if (l2 == INFINITY) { + } + + i

[clang] [HIP] Fix return type in __clang_hip_cmath.h (PR #139697)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Juan Manuel Martinez Caamaño (jmmartinez) Changes Before, some functions like `isgreater(double, double)` would return a `double` instead of a `bool`. I've stumbled upon this bug while trying to adapt [`External/CUDA/cmath.cu`](htt

[clang-tools-extra] Fix the issue #139467 ([clang-tidy] false positive narrowing conversion) (PR #139474)

2025-05-13 Thread via cfe-commits
AndreyG wrote: > Please mention changes in Release Notes. Done: https://github.com/llvm/llvm-project/pull/139474/files#diff-1c1f5fd4fa3f177899b71a6bf4582a6277de0df37dae33a9c670c73f28cc1ce6R145-R148 https://github.com/llvm/llvm-project/pull/139474 ___

[clang] [HIP] Fix return type in __clang_hip_cmath.h (PR #139697)

2025-05-13 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez created https://github.com/llvm/llvm-project/pull/139697 Before, some functions like `isgreater(double, double)` would return a `double` instead of a `bool`. I've stumbled upon this bug while trying to adapt [`External/CUDA/cmath.cu`](https://github.com/llvm/llvm

[clang-tools-extra] Fix the issue #139467 ([clang-tidy] false positive narrowing conversion) (PR #139474)

2025-05-13 Thread via cfe-commits
https://github.com/AndreyG updated https://github.com/llvm/llvm-project/pull/139474 >From 26937479d0eee670946d6c4165c0522e271b5c76 Mon Sep 17 00:00:00 2001 From: Andrey Davydov Date: Sun, 11 May 2025 22:23:38 +0200 Subject: [PATCH] [clang-tidy] false positive narrowing conversion Let's conside

[clang-tools-extra] Fix the issue #139467 ([clang-tidy] false positive narrowing conversion) (PR #139474)

2025-05-13 Thread via cfe-commits
@@ -554,15 +554,23 @@ bool NarrowingConversionsCheck::handleConditionalOperator( // We have an expression like so: `output = cond ? lhs : rhs` // From the point of view of narrowing conversion we treat it as two // expressions `output = lhs` and `output = rhs`. -

[clang] [lld] [llvm] [mlir] [NFC] Use more isa and isa_and_nonnull instead dyn_cast for predicates (PR #137393)

2025-05-13 Thread Max Graey via cfe-commits
https://github.com/MaxGraey updated https://github.com/llvm/llvm-project/pull/137393 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] [RISCV] Improve casting between i1 scalable vectors and i8 fixed vectors for -mrvv-vector-bits (PR #139190)

2025-05-13 Thread Paul Walker via cfe-commits
@@ -1476,8 +1486,14 @@ CoerceScalableToFixed(CodeGenFunction &CGF, llvm::FixedVectorType *ToTy, // If we are casting a scalable i1 predicate vector to a fixed i8 // vector, first bitcast the source. if (FromTy->getElementType()->isIntegerTy(1) && - FromTy->getElemen

[clang] [RISC-V] Allow intrinsics to be used with any pointer type. (PR #139634)

2025-05-13 Thread Harald van Dijk via cfe-commits
hvdijk wrote: > This PR is too huge and it almost makes my Chrome broken. :-( I don't think there is a way to meaningfully split this up, sorry. The changes to `llvm/include/llvm/IR/IntrinsicsRISCV.td` are the main changes, everything else is the minimal required to allow those changes. https

[clang] [RISC-V] Allow intrinsics to be used with any pointer type. (PR #139634)

2025-05-13 Thread Harald van Dijk via cfe-commits
@@ -63,11 +63,11 @@ multiclass RVVVLEFFBuiltin types> { if ((PolicyAttrs & RVV_VTA) && (PolicyAttrs & RVV_VMA)) Ops.insert(Ops.begin(), llvm::PoisonValue::get(ResultType)); Ops.push_back(ConstantInt::get(Ops.back()->getType(), PolicyAttrs)); -

[clang] 3009aa7 - [clang][Tooling] Extend special symbol mappings for (U)INTN_C

2025-05-13 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2025-05-13T12:14:09+02:00 New Revision: 3009aa75cae240fc400c65c748a366d584998f9d URL: https://github.com/llvm/llvm-project/commit/3009aa75cae240fc400c65c748a366d584998f9d DIFF: https://github.com/llvm/llvm-project/commit/3009aa75cae240fc400c65c748a366d584998f9d.dif

[clang] [lld] [llvm] [mlir] [NFC] Use more isa and isa_and_nonnull instead dyn_cast for predicates (PR #137393)

2025-05-13 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-b-1` while building `clang,lld,llvm,mlir` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/15042 Here is

[clang] [llvm] Revert "[lit][clang] Avoid realpath on Windows due to MAX_PATH limitations" (PR #139739)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (guillem-bartrina-sonarsource) Changes This reverts commit 05d613ea931b6de1b46dfe04b8e55285359047f4. Only **one single** test has been added after the reverted patch that makes use of the _functionality_ it introduced. * The macro `%

[clang] [llvm] Revert "[lit][clang] Avoid realpath on Windows due to MAX_PATH limitations" (PR #139739)

2025-05-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal ready_for_review https://github.com/llvm/llvm-project/pull/139739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Fix crash with invalid size expression (PR #139745)

2025-05-13 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/139745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "[lit][clang] Avoid realpath on Windows due to MAX_PATH limitations" (PR #139739)

2025-05-13 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r HEAD~1...HEAD llvm/utils/lit/lit/TestRunner.py llvm/utils/lit/lit/builtin_commands/diff.py

[clang] [C] Fix a false-positive with tentative defn compat (PR #139738)

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

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sirui Mu (Lancern) Changes This PR adds support for indirect calls to the `cir.call` operation. --- Patch is 21.03 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/139748.diff 12 Files Affected

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-13 Thread Sirui Mu via cfe-commits
https://github.com/Lancern created https://github.com/llvm/llvm-project/pull/139748 This PR adds support for indirect calls to the `cir.call` operation. >From 786327894695a73ec80ec256892ca51e68fa5389 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Tue, 13 May 2025 23:02:08 +0800 Subject: [PATCH]

[clang] [llvm] [AArch64][SelectionDAG] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-05-13 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: Hi @rgwott, I'm working on changes in the AMDGPU backend that would benefit from the PTRADD SelectionDAG opcode that this PR adds. I understand that this PR is low priority for you right now, so I'd like to suggest extracting the relevant changes to enable PTRADD nodes (witho

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/139749 Add a `setExprs` overload to `OpenACCClauseWithExprs` that allows initializing the trailing storage to help eliminate some code duplication in various subclass constructors. Rate limit

[clang] [llvm] Revert "[lit][clang] Avoid realpath on Windows due to MAX_PATH limitations" (PR #139739)

2025-05-13 Thread via cfe-commits
https://github.com/guillem-bartrina-sonarsource updated https://github.com/llvm/llvm-project/pull/139739 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,H

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Balazs Benics via cfe-commits
@@ -3411,12 +3411,12 @@ PathSensitiveBugReporter::generateDiagnosticForConsumerMap( } void BugReporter::EmitBasicReport(const Decl *DeclWithIssue, - const CheckerBase *Checker, StringRef Name, + const CheckerFr

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Balazs Benics via cfe-commits
@@ -484,83 +484,87 @@ class Call { } // end eval namespace -class CheckerBase : public ProgramPointTag { - /// A single checker class (i.e. a subclass of `CheckerBase`) can implement - /// multiple user-facing checkers that have separate names and can be enabled - /// sepa

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Balazs Benics via cfe-commits
@@ -25,25 +25,23 @@ using namespace ento; using namespace taint; namespace { -class DivZeroChecker : public Checker> { +class DivZeroChecker : public CheckerFamily> { void reportBug(StringRef Msg, ProgramStateRef StateZero, CheckerContext &C) const; voi

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Balazs Benics via cfe-commits
@@ -484,83 +484,87 @@ class Call { } // end eval namespace -class CheckerBase : public ProgramPointTag { - /// A single checker class (i.e. a subclass of `CheckerBase`) can implement - /// multiple user-facing checkers that have separate names and can be enabled - /// sepa

[clang] [RISCV] Improve casting between i1 scalable vectors and i8 fixed vectors for -mrvv-vector-bits (PR #139190)

2025-05-13 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/139190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/139256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Balazs Benics via cfe-commits
@@ -56,11 +54,11 @@ static const Expr *getDenomExpr(const ExplodedNode *N) { void DivZeroChecker::reportBug(StringRef Msg, ProgramStateRef StateZero, CheckerContext &C) const { - if (!isPartEnabled(DivideZeroChecker)) + if (!DivideZeroChecker.i

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Balazs Benics via cfe-commits
@@ -64,9 +65,9 @@ class CheckerFn { Func Fn; public: - CheckerBase *Checker; + CheckerBackend *Checker; - CheckerFn(CheckerBase *checker, Func fn) : Fn(fn), Checker(checker) {} + CheckerFn(CheckerBackend *checker, Func fn) : Fn(fn), Checker(checker) {}

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Balazs Benics via cfe-commits
@@ -25,25 +25,23 @@ using namespace ento; using namespace taint; namespace { -class DivZeroChecker : public Checker> { +class DivZeroChecker : public CheckerFamily> { void reportBug(StringRef Msg, ProgramStateRef StateZero, CheckerContext &C) const; voi

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: I think this one is a really good direction. I like it. I left a couple minor remarks inline. https://github.com/llvm/llvm-project/pull/139256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Balazs Benics via cfe-commits
@@ -50,11 +50,11 @@ bool CheckerManager::hasPathSensitiveCheckers() const { } void CheckerManager::reportInvalidCheckerOptionValue( -const CheckerBase *C, CheckerPartIdx Idx, StringRef OptionName, +const CheckerFrontend *CP, StringRef OptionName, steak

[clang] [RISCV] Improve casting between i1 scalable vectors and i8 fixed vectors for -mrvv-vector-bits (PR #139190)

2025-05-13 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/139190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Disable checking invalid template id in initializer of primary variable template `std::format_kind` with libstdc++ (PR #139560)

2025-05-13 Thread via cfe-commits
cor3ntin wrote: I think we should - 1/ Land this patch as is - 2/ Extract the parsing of `__GLIBCXX__` in a separate function - 3/ have a function, probably in Preprocessor (so that it is available from Sema and Parser) such as `IsLibStdCxxBefore(_version_)` that let us do these checks unifo

[clang] [HIP] Fix return type in __clang_hip_cmath.h (PR #139697)

2025-05-13 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez edited https://github.com/llvm/llvm-project/pull/139697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Disable checking invalid template id in initializer of primary variable template `std::format_kind` with libstdc++ (PR #139560)

2025-05-13 Thread via cfe-commits
cor3ntin wrote: @zyn0217 At the very minimum, it breaks compiler explorer and anyone who uses trunk; it is disruptive https://github.com/llvm/llvm-project/pull/139560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Balazs Benics via cfe-commits
@@ -40,22 +40,23 @@ template <> struct FoldingSetTrait { namespace { class VirtualCallChecker -: public Checker { +: public CheckerFamily { public: - enum : CheckerPartIdx { PureChecker, ImpureChecker, NumCheckerParts }; - - BugType BugTypes[NumCheckerParts] = { -

[clang] [Clang] Add `noalias` to `this` pointer in C++ constructors (PR #136792)

2025-05-13 Thread Guy David via cfe-commits
guy-david wrote: > > @zygoloid Can you explain in your example why `a.n == 2` must be true, when > > your interpretation (which I understood in the same manner) of the > > standard's wording does indicate that the object's state is unspecified? > > My reading is that the standard says that the

[clang] [Clang][Sema] Disable checking invalid template id in initializer of primary variable template `std::format_kind` with libstdc++ (PR #139560)

2025-05-13 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/139560 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-ser

[clang-tools-extra] 75e0865 - [clang-tools-extra] Use llvm::unique (NFC) (#139663)

2025-05-13 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-05-12T23:24:24-07:00 New Revision: 75e0865837519493c4efaa6f33480e1db8f2e462 URL: https://github.com/llvm/llvm-project/commit/75e0865837519493c4efaa6f33480e1db8f2e462 DIFF: https://github.com/llvm/llvm-project/commit/75e0865837519493c4efaa6f33480e1db8f2e462.diff L

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-13 Thread Iris Shi via cfe-commits
@@ -599,6 +599,13 @@ void RISCVInstrInfo::copyPhysReg(MachineBasicBlock &MBB, return; } + if (RISCV::FPR128RegClass.contains(DstReg, SrcReg)) { el-ev wrote: I missed it. Removed. https://github.com/llvm/llvm-project/pull/139369 ___

[clang] [Clang] Add `noalias` to `this` pointer in C++ constructors (PR #136792)

2025-05-13 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I just got a case: ``` class A { public: class B { public: B(A *); // some non static data fields }; B b(this); }; ``` Does this a valid prove that this optimization is not valid ? https://github.com/llvm/llvm-project/pull/136792 __

<    1   2   3   4   5   6   >