[clang] [clang] Implement CWG2803 and CWG2958 (PR #132779)

2025-04-05 Thread via cfe-commits
https://github.com/offsetof created https://github.com/llvm/llvm-project/pull/132779 CWG2803 "Overload resolution for reference binding of similar types" CWG2958 "Overload resolution involving lvalue transformation and qualification conversion" >From 6c5441fd1e22e93de3a6c681842fe19f6e96fa62 Mo

[clang] fixed clang frontend crash with friend class declaration and overload == (PR #133878)

2025-04-05 Thread Ankur Ahir via cfe-commits
https://github.com/Ankur-0429 updated https://github.com/llvm/llvm-project/pull/133878 >From 289f8630dccf916b8cf7cc43758bae60df036c5d Mon Sep 17 00:00:00 2001 From: Ankur Ahir Date: Wed, 2 Apr 2025 00:53:33 -0700 Subject: [PATCH] clang frontend crash with friend class declaration and overloade

[clang] [clang] Track final substitution for Subst* AST nodes (PR #132748)

2025-04-05 Thread Thurston Dang via cfe-commits
thurstond wrote: > @fmayer this patch touches nowhere near where those backtraces indicate. > #130182 is a far more likely culprit. #130182 cannot be the cause of the ongoing MSan buildbot failures, because it was already reverted two days ago in #134239 https://github.com/llvm/llvm-project/

[clang] [HLSL] Finish exposing half types and intrinsics always (PR #132804)

2025-04-05 Thread Sarah Spall via cfe-commits
spall wrote: > this is not NFC, so we should verify that we can call these intrinsics with > `half` values even if 16-bit types aren't enabled, and that they properly > codegen to 32-bit varia > > > > > For example, for `abs`, it still depends on the > > > > > _HLSL_16BIT_AVAILABILITY availab

[clang] Allow direct dispatch for the ObjFW runtime (PR #126382)

2025-04-05 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/126382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86][AVX10.2] Use 's_' for saturate-convert intrinsics (PR #131592)

2025-04-05 Thread Haochen Jiang via cfe-commits
jianghc724 wrote: should be cvts_biasph_hf8 :) https://github.com/llvm/llvm-project/pull/131592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OffloadBundler] Rework the ctor of `OffloadTargetInfo` to support AMDGPU's generic target (PR #122629)

2025-04-05 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/122629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)

2025-04-05 Thread Amy Huang via cfe-commits
amykhuang wrote: Hi we're seeing some msan failures after this patch in tests such as clang-tools-extra/test/clang-tidy/checkers/modernize/use-using.cpp Here's the top of the stack trace ``` ==6262==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x560847d4ff8a in clang::DependentT

[clang] Add warning message for C++17 alias template CTAD (PR #133806)

2025-04-05 Thread via cfe-commits
https://github.com/GeorgeKA created https://github.com/llvm/llvm-project/pull/133806 Alias template class template argument deduction is a documented C++20 feature. C++17 also happens to support it, but there is no message output to indicate the officially supported version. This PR adds that

[clang] [clang-format] Merge inline short functions for BS_Whitesmiths (PR #134473)

2025-04-05 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/134473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-05 Thread Owen Pan via cfe-commits
@@ -1893,6 +1938,8 @@ FormatStyle getChromiumStyle(FormatStyle::LanguageKind Language) { } else { ChromiumStyle.AllowAllParametersOfDeclarationOnNextLine = false; ChromiumStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline; +ChromiumStyle.AllowShortF

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-05 Thread Owen Pan via cfe-commits
@@ -5687,11 +5687,10 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, if (Right.is(tok::r_brace) && Left.is(tok::l_brace) && !Left.Children.empty()) { // Support AllowShortFunctionsOnASingleLine for JavaScript. - return Style.AllowShort

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-05 Thread Owen Pan via cfe-commits
@@ -1907,6 +1954,8 @@ FormatStyle getMozillaStyle() { FormatStyle MozillaStyle = getLLVMStyle(); MozillaStyle.AllowAllParametersOfDeclarationOnNextLine = false; MozillaStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline; + MozillaStyle.AllowShortFunctionsOnA

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-05 Thread Owen Pan via cfe-commits
@@ -1472,6 +1483,30 @@ static void expandPresetsSpacesInParens(FormatStyle &Expanded) { Expanded.SpacesInParensOptions = {}; } +static void expandPresetsShortFunctionsOnSingleLine(FormatStyle &Expanded) { + if (Expanded.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-05 Thread Owen Pan via cfe-commits
@@ -1501,6 +1536,8 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { LLVMStyle.AllowShortCompoundRequirementOnASingleLine = true; LLVMStyle.AllowShortEnumsOnASingleLine = true; LLVMStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_All; + LLVMStyl

[clang] [clang] fp options fix for __builtin_convertvector (PR #134102)

2025-04-05 Thread Jakub Ficek via cfe-commits
https://github.com/ficol created https://github.com/llvm/llvm-project/pull/134102 Add missing CGFPOptionsRAII for fptoi and itofp cases >From 5f0a65433744a9b1abd3aa82417d716a0aa5b33b Mon Sep 17 00:00:00 2001 From: "Ficek, Jakub" Date: Wed, 2 Apr 2025 17:41:30 +0200 Subject: [PATCH] [clang] fp

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-04-05 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/133462 >From a23ba4d51332180ff5d1b5bc9de2d0c6c04cbf66 Mon Sep 17 00:00:00 2001 From: naveen-seth Date: Fri, 28 Mar 2025 06:59:06 +0100 Subject: [PATCH] [clang][modules] Guard against bad -fmodule-file mappings (#1

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-05 Thread Oliver Hunt via cfe-commits
@@ -16223,6 +16324,70 @@ bool Sema::CompleteConstructorCall(CXXConstructorDecl *Constructor, return Invalid; } +bool Sema::isTypeAwareOperatorNewOrDelete(const NamedDecl *ND) const { + const FunctionDecl *FnDecl = nullptr; ojhunt wrote: Removed and replac

[clang] [clang-tools-extra] [clang][AST][clang-tidy] Do not set a reduced traversal scope in ASTM… (PR #132725)

2025-04-05 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet commented: > Are you able to test this PR and confirm it fixes the regressions you > encountered? hi @carlosgalvezp , yes this fixes the particular issues we had, thanks! https://github.com/llvm/llvm-project/pull/132725 __

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-04-05 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/131280 >From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001 From: hulxv Date: Fri, 14 Mar 2025 07:39:15 +0200 Subject: [PATCH 1/7] [clang-doc] [feat] add `--repository-line-prefix` argument (fix #5981

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

2025-04-05 Thread Greg Clayton via cfe-commits
clayborg wrote: FYI: There is already VTable support in our lldb::SBValue class and it is part of the public API in LLDB and doesn't require any of this: ``` /// If this value represents a C++ class that has a vtable, return an value /// that represents the virtual function table. /// //

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-04-05 Thread marius doerner via cfe-commits
https://github.com/mariusdr edited https://github.com/llvm/llvm-project/pull/133574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Correctly handle structured bindings captured by lambda (PR #132579)

2025-04-05 Thread via cfe-commits
@@ -0,0 +1,127 @@ +// RUN: %clang_analyze_cc1 -std=c++20 -analyzer-checker=core,debug.ExprInspection -analyzer-config inline-lambdas=true -verify %s + +#include "Inputs/system-header-simulator-cxx.h" +void clang_analyzer_warnIfReached(); +void clang_analyzer_eval(int); + +void c

[clang] [WIP] Implement `print-deserialized-declarations` flag to dump source… (PR #133910)

2025-04-05 Thread Viktoriia Bakalova via cfe-commits
https://github.com/VitaNuo edited https://github.com/llvm/llvm-project/pull/133910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Remove experimental from Sdext and Sdtrig which are ratified. (PR #132529)

2025-04-05 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. https://github.com/llvm/llvm-project/pull/132529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-04-05 Thread Benjamin Maxwell via cfe-commits
@@ -0,0 +1,8530 @@ +//===-- AArch64.cpp - Emit LLVM Code for builtins -===// +// +// 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: A

[clang] d71ee7d - [clang-format] Set C11 instead of C17 for LK_C (#134472)

2025-04-05 Thread via cfe-commits
Author: Owen Pan Date: 2025-04-05T13:35:45-07:00 New Revision: d71ee7d23048ca64d14a7536927a006867cea39a URL: https://github.com/llvm/llvm-project/commit/d71ee7d23048ca64d14a7536927a006867cea39a DIFF: https://github.com/llvm/llvm-project/commit/d71ee7d23048ca64d14a7536927a006867cea39a.diff LOG:

[clang] [clang-format] Set C11 instead of C17 for LK_C (PR #134472)

2025-04-05 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/134472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Set C11 instead of C17 for LK_C (PR #134472)

2025-04-05 Thread Owen Pan via cfe-commits
owenca wrote: > But why does this fix it? See [here](https://github.com/llvm/llvm-project/blob/52eb11f925ddeba4e1b3840fd636ee87387f3ada/clang/lib/Lex/Lexer.cpp#L3893). Somehow I thought that setting C17 would also set C11. 😞 https://github.com/llvm/llvm-project/pull/134472 __

[clang] [clang-format] Set C11 instead of C17 for LK_C (PR #134472)

2025-04-05 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick d71ee7d23048ca64d14a7536927a006867cea39a https://github.com/llvm/llvm-project/pull/134472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Set C11 instead of C17 for LK_C (PR #134472)

2025-04-05 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: d71ee7d23048ca64d14a7536927a006867cea39a https://github.com/llvm/llvm-project/actions/runs/14285590977 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 `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-05 Thread via cfe-commits
sstwcw wrote: When I changed the `AlignConsecutiveAssignments` option, I was told to reuse the same option name. Now the program allows the user to specify the option as either a string or an associative array. https://github.com/llvm/llvm-project/pull/134337 _

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-05 Thread Owen Pan via cfe-commits
owenca wrote: > When I changed the `AlignConsecutiveAssignments` option, I was told to reuse > the same option name. Now the program allows the user to specify the option > as either a string or an associative array. Reusing the option name is IMO better than adding `SFS_Custom`. @irymarchyk i

[clang] [clang] Track final substitution for Subst* AST nodes (PR #132748)

2025-04-05 Thread Thurston Dang via cfe-commits
thurstond wrote: > @thurstond Well can you provide a more recent buildbot failure link where > #130182 is not on the list of possible culpirits? Because the link @fmayer > provided for sure included it. @mizvekov I localized the MSan error to this patch by re-running the buildbot script with

<    3   4   5   6   7   8