[clang] Fixed vec_pack_to_short_fp32 in Clang altivec.h (PR #129923)

2025-03-17 Thread Lei Huang via cfe-commits
lei137 wrote: @johnplatts Please resolve the conflicts for this PR. https://github.com/llvm/llvm-project/pull/129923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/131515 >From ae66e1cc48c721badc234ff5bc5a89aeb6cd2ea3 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sun, 16 Mar 2025 14:04:15 +0100 Subject: [PATCH 1/9] [Clang][RFC] Intrododuce a builtin to determine the numbe

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

2025-03-17 Thread Yaxun Liu via cfe-commits
@@ -520,32 +520,32 @@ // Check archive unbundling // // Create few code object bundles and archive them to create an input archive -// RUN: clang-offload-bundler -type=o -targets=host-%itanium_abi_triple,openmp-amdgcn-amd-amdhsa-gfx906,openmp-amdgcn-amd-amdhsa--gfx908 -input=

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

2025-03-17 Thread Paul Kirth via cfe-commits
@@ -750,11 +754,15 @@ genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) { Out.emplace_back(std::move(Table)); if (I.DefLoc) { -if (!CDCtx.RepositoryUrl) - Out.emplace_back(writeFileDefinition(*I.DefLoc)); -else - Out.emplace_back( - writeF

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

2025-03-17 Thread Paul Kirth via cfe-commits
@@ -518,10 +519,12 @@ struct ClangDocContext { // the file is in this dir. // URL of repository that hosts code used for links to definition locations. std::optional RepositoryUrl; + // Prefix of line code for repository. + std::optional Reposi

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

2025-03-17 Thread Paul Kirth via cfe-commits
@@ -57,7 +57,12 @@ static void writeFileDefinition(const ClangDocContext &CDCtx, const Location &L, OS << "*Defined at " << L.Filename << "#" << std::to_string(L.LineNumber) << "*"; } else { -OS << "*Defined at [" << L.Filename << "#" << std::to_string(L.LineN

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

2025-03-17 Thread Paul Kirth via cfe-commits
@@ -99,6 +99,12 @@ URL of repository that hosts code. Used for links to definition locations.)"), llvm::cl::cat(ClangDocCategory)); +static llvm::cl::opt +RepositoryCodeLinePrefix("repository-line-prefix", llvm::cl::desc(R"( +Prefix of line code for repos

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

2025-03-17 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,342 @@ +// RUN: rm -rf %t && mkdir -p %t/docs %t/build ilovepi wrote: Instead of an entirely new test, I'd prefer to see the differences in the existing test. Ideally expressed in a way that makes it clear what's different between the two. So someth

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

2025-03-17 Thread Paul Kirth via cfe-commits
@@ -514,17 +514,21 @@ writeFileDefinition(const Location &L, Node->Children.emplace_back(std::make_unique("Defined at line ")); auto LocNumberNode = std::make_unique(HTMLTag::TAG_A, std::to_string(L.LineNumber)); - // The links to a specific line in the source code u

[clang] [Headers] Create stub spirvintrin.h (PR #131164)

2025-03-17 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: @jhuber6 I think we should have this despite the rejected https://github.com/llvm/llvm-project/pull/131190. Maybe we'll get some clang builtins for spirv. Otherwise some things can be done with the asm label hack. Some can just be left as nop, e.g. a suspend that does n

[clang] [Clang] emit -Wunused-variable warning for unused structured bindings without the [[maybe_unused]] attribute (PR #127061)

2025-03-17 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/127061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers] Create stub spirvintrin.h (PR #131164)

2025-03-17 Thread Joseph Huber via cfe-commits
jhuber6 wrote: We should probably wait until we have builtins, since there's no utility in just having stubs right now. https://github.com/llvm/llvm-project/pull/131164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-17 Thread Jon Chesterfield via cfe-commits
@@ -0,0 +1,501 @@ +//===- LowerGPUIntrinsic.cpp --===// +// +// 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] [analyzer] Add [[maybe_unused]] forgotten in 57e36419b251 (PR #131617)

2025-03-17 Thread Balazs Benics via cfe-commits
steakhal wrote: CC @necto https://github.com/llvm/llvm-project/pull/131617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread Erich Keane via cfe-commits
@@ -434,6 +434,37 @@ __datasizeof ``__datasizeof`` behaves like ``sizeof``, except that it returns the size of the type ignoring tail padding. +.. _builtin_structured_binding_size-doc: + +__builtin_structured_binding_size (C++) +--- +``__bu

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

2025-03-17 Thread Paul Kirth via cfe-commits
@@ -514,17 +514,21 @@ writeFileDefinition(const Location &L, Node->Children.emplace_back(std::make_unique("Defined at line ")); auto LocNumberNode = std::make_unique(HTMLTag::TAG_A, std::to_string(L.LineNumber)); - // The links to a specific line in the source code u

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

2025-03-17 Thread Paul Kirth via cfe-commits
@@ -514,17 +514,21 @@ writeFileDefinition(const Location &L, Node->Children.emplace_back(std::make_unique("Defined at line ")); auto LocNumberNode = std::make_unique(HTMLTag::TAG_A, std::to_string(L.LineNumber)); - // The links to a specific line in the source code u

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

2025-03-17 Thread Paul Kirth via cfe-commits
@@ -866,11 +878,15 @@ genHTML(const RecordInfo &I, Index &InfoIndex, const ClangDocContext &CDCtx, Out.emplace_back(std::make_unique(HTMLTag::TAG_H1, InfoTitle)); if (I.DefLoc) { -if (!CDCtx.RepositoryUrl) - Out.emplace_back(writeFileDefinition(*I.DefLoc)); -

[clang] [clang][ASTImporter] Fix AST import if anonymous namespaces are merged (PR #128735)

2025-03-17 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/128735 From 3fae6f2bed93144561138704accb43c6544cfb56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Tue, 25 Feb 2025 17:17:02 +0100 Subject: [PATCH 1/2] [clang][ASTImporter] Fix AST import if

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

2025-03-17 Thread Tom Tromey via cfe-commits
tromey wrote: > But, yeah, I wouldn't mind hearing more about lldb's > needs/preferences/hopes/dreams for this feature so we might get a design > that's more portable at least between SCE and LLDB. (bonus points if anyone's > got GDB's needs in mind - perhaps @tromey might be able to lend us s

[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)

2025-03-17 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,117 @@ +// RUN: %clang_cc1 -verify=expected,c2y -pedantic -std=c2y %s +// RUN: %clang_cc1 -verify=expected,c2y,compat -Wpre-c2y-compat -std=c2y %s +// RUN: %clang_cc1 -verify=expected,ext -pedantic -std=c23 %s +// RUN: %clang_cc1 -verify=expected,cpp -pedantic -x c++ -W

[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)

2025-03-17 Thread via cfe-commits
@@ -582,6 +582,12 @@ class Lexer : public PreprocessorLexer { /// sequence. static bool isNewLineEscaped(const char *BufferStart, const char *Str); + /// Diagnose use of a delimited or named escape sequence. + static void DiagnoseDelimitedOrNamedEscapeSequence(SourceLoca

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread Erich Keane via cfe-commits
@@ -434,6 +434,37 @@ __datasizeof ``__datasizeof`` behaves like ``sizeof``, except that it returns the size of the type ignoring tail padding. +.. _builtin_structured_binding_size-doc: + +__builtin_structured_binding_size (C++) +--- +``__bu

[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)

2025-03-17 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/131626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)

2025-03-17 Thread Aaron Ballman via cfe-commits
@@ -582,6 +582,12 @@ class Lexer : public PreprocessorLexer { /// sequence. static bool isNewLineEscaped(const char *BufferStart, const char *Str); + /// Diagnose use of a delimited or named escape sequence. + static void DiagnoseDelimitedOrNamedEscapeSequence(SourceLoca

[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)

2025-03-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/131626 >From f3c0bc1d271495372b56716e87f033e43aa022b3 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Mon, 17 Mar 2025 11:12:56 -0400 Subject: [PATCH 1/5] [C2y] Add octal prefixes, deprecate unprefixed octals

[clang] [HLSL] Add bounds checks for the HLSL `fmod` vector arguments and return types (PR #131035)

2025-03-17 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng updated https://github.com/llvm/llvm-project/pull/131035 >From 72625f987846d33c11e57ec4e42e98bf211f3389 Mon Sep 17 00:00:00 2001 From: kmpeng Date: Tue, 11 Mar 2025 16:47:27 -0700 Subject: [PATCH] add bounds checks for the hlsl fmod vector arguments and return types

[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)

2025-03-17 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,120 @@ +// RUN: %clang_cc1 -verify=expected,c2y -pedantic -std=c2y %s +// RUN: %clang_cc1 -verify=expected,c2y,compat -Wpre-c2y-compat -std=c2y %s +// RUN: %clang_cc1 -verify=expected,ext -pedantic -std=c23 %s +// RUN: %clang_cc1 -verify=expected,cpp -pedantic -x c++ -W

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-17 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/131094 >From bcdf9641037507b855a20a8ba5d26b127dd248e8 Mon Sep 17 00:00:00 2001 From: dong-miao Date: Sat, 4 Jan 2025 17:53:58 +0800 Subject: [PATCH 01/29] Update RISCVSystemOperands.td --- llvm/lib/Target/RISCV/RIS

[clang] [Fuchsia] Support PGO (PR #128680)

2025-03-17 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/128680 >From 0662cddc6837c281c102995e2789bb0f81adb415 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Fri, 7 Feb 2025 08:49:18 -0800 Subject: [PATCH 1/3] [Fuchsia] Support PGO Enable 2-stage builds with PGO. --- ..

[clang] [Headers] Create stub spirvintrin.h (PR #131164)

2025-03-17 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: The utility is having a place to fill things in incrementally as we get them working, and thus use libc to drive the implementation of enough of spirv to get things working. If you decline to have any spirv code until everything is working I'll have to do the testing som

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/131515 >From ae66e1cc48c721badc234ff5bc5a89aeb6cd2ea3 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sun, 16 Mar 2025 14:04:15 +0100 Subject: [PATCH 01/11] [Clang][RFC] Intrododuce a builtin to determine the num

[clang] af5abd9 - [HLSL] add extra scalar vector overloads for clamp (#129939)

2025-03-17 Thread via cfe-commits
Author: Sarah Spall Date: 2025-03-17T11:48:52-07:00 New Revision: af5abd9a682d3a7d993f1b4fcae92efe318b835c URL: https://github.com/llvm/llvm-project/commit/af5abd9a682d3a7d993f1b4fcae92efe318b835c DIFF: https://github.com/llvm/llvm-project/commit/af5abd9a682d3a7d993f1b4fcae92efe318b835c.diff L

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread via cfe-commits
@@ -1642,6 +1661,50 @@ void Sema::CheckCompleteDecompositionDeclaration(DecompositionDecl *DD) { DD->setInvalidDecl(); } +std::optional Sema::GetDecompositionElementCount(QualType T, + SourceLocation Loc) { + con

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes This change adds global initialization for ArrayType Issue #130197 --- Patch is 32.77 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/131657.diff 13 Files Af

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-17 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur commented: Approach look OK to me. Could you add test(s) along the lines of [aix-rlib.c](https://github.com/llvm/llvm-project/blob/main/clang/test/Driver/aix-rtlib.c). If we make further changes, knowing what is expected on AIX/PPCLunux would be very helpful. A

[clang] [llvm] [BPF] Make -mcpu=v3 as the default (PR #107008)

2025-03-17 Thread via cfe-commits
yonghong-song wrote: @yuvald-sweet-security Could you share which kernel you are used for above testing? https://github.com/llvm/llvm-project/pull/107008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [HLSL] Buffer handle globals should not be constants (PR #130231)

2025-03-17 Thread Steven Perron via cfe-commits
https://github.com/s-perron approved this pull request. https://github.com/llvm/llvm-project/pull/130231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/131515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 911b200 - [Clang] Constant Expressions inside of GCC' asm strings (#131003)

2025-03-17 Thread via cfe-commits
Author: cor3ntin Date: 2025-03-17T20:10:46+01:00 New Revision: 911b200ce339ace2d55cd2827bb10ed6a494faae URL: https://github.com/llvm/llvm-project/commit/911b200ce339ace2d55cd2827bb10ed6a494faae DIFF: https://github.com/llvm/llvm-project/commit/911b200ce339ace2d55cd2827bb10ed6a494faae.diff LOG:

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-17 Thread Daniel Chen via cfe-commits
DanielCChen wrote: @arichardson I found the way to override the cache file. Thanks for the suggestion! https://github.com/llvm/llvm-project/pull/131200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [HLSL] add extra scalar vector overloads for clamp (PR #129939)

2025-03-17 Thread Sarah Spall via cfe-commits
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/129939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-17 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/131041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-03-17 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. https://github.com/llvm/llvm-project/pull/131369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-17 Thread Daniel Chen via cfe-commits
DanielCChen wrote: > Approach look OK to me. > > Could you add test(s) along the lines of > [aix-rlib.c](https://github.com/llvm/llvm-project/blob/main/clang/test/Driver/aix-rtlib.c). > If we make further changes, knowing what is expected on AIX/PPCLunux would > be very helpful. > > A review

[clang] [Headers] Create stub spirvintrin.h (PR #131164)

2025-03-17 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: Well it's not pretty, but spirv64-amd-amdhsa sets both __AMDGPU__ and __SPIRV64__ macros. Added a commit with an example that dispatches to amdgpu intrinsics on the happy path and preprocessor error otherwise. If you let that get to the spirv backend it falls over with `

[clang] [Clang][RFC] Introduce a trait to determine the structure binding size (PR #131515)

2025-03-17 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/131515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/131515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers] Create stub spirvintrin.h (PR #131164)

2025-03-17 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 c9d7f707c101896294d2f4ccbf26329894295dc9 1dbc0b25e69879a8799a03027e257ea68e1d596f --e

[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-03-17 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Regarding the double const , I think this is not a type printer bug per se. By indiscriminately adding a qualifier to a type, we can produce a type which cannot be written, such as this const qualified array case. As such, we can never do a good job printing these anyway. Ther

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-17 Thread Michal Paszkowski via cfe-commits
https://github.com/michalpaszkowski edited https://github.com/llvm/llvm-project/pull/131190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DependencyScanning] Track modules that resolve from "shared" locations (PR #130634)

2025-03-17 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/130634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-17 Thread Mohamed Emad via cfe-commits
@@ -518,10 +519,12 @@ struct ClangDocContext { // the file is in this dir. // URL of repository that hosts code used for links to definition locations. std::optional RepositoryUrl; + // Prefix of line code for repository. + std::optional Reposi

[clang] [Format] Do not crash on non-null terminated strings (PR #131299)

2025-03-17 Thread Björn Schäpers via cfe-commits
@@ -2382,14 +2382,20 @@ size_t SourceManager::getDataStructureSizes() const { SourceManagerForFile::SourceManagerForFile(StringRef FileName, StringRef Content) { + // We copy to `std::string` for Context instead of StringRef because

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

2025-03-17 Thread Björn Schäpers via cfe-commits
@@ -148,6 +160,24 @@ class AnnotatingParser { } } + const FormatStyle::FunctionDeclarationWithKeywords * + isInsideFunctionWithKeywordedParameters(const FormatToken &Token) const { +const FormatToken *Previous = &Token; +while (auto Prev = Previous->getPrevious

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

2025-03-17 Thread Björn Schäpers via cfe-commits
@@ -148,6 +160,24 @@ class AnnotatingParser { } } + const FormatStyle::FunctionDeclarationWithKeywords * + isInsideFunctionWithKeywordedParameters(const FormatToken &Token) const { HazardyKnusperkeks wrote: The name is misleading, I'd expect a `bool`e

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

2025-03-17 Thread Björn Schäpers via cfe-commits
@@ -148,6 +160,24 @@ class AnnotatingParser { } } + const FormatStyle::FunctionDeclarationWithKeywords * + isInsideFunctionWithKeywordedParameters(const FormatToken &Token) const { +const FormatToken *Previous = &Token; +while (auto Prev = Previous->getPrevious

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

2025-03-17 Thread Björn Schäpers via cfe-commits
@@ -5435,7 +5470,10 @@ struct FormatStyle { VerilogBreakBetweenInstancePorts == R.VerilogBreakBetweenInstancePorts && WhitespaceSensitiveMacros == R.WhitespaceSensitiveMacros && - WrapNamespaceBodyWithEmptyLines == R.WrapNamespace

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

2025-03-17 Thread Björn Schäpers via cfe-commits
@@ -116,6 +116,18 @@ static bool isCppAttribute(bool IsCpp, const FormatToken &Tok) { return AttrTok && AttrTok->startsSequence(tok::r_square, tok::r_square); } +static bool isParametersKeyword( +const FormatToken &Tok, +const FormatStyle::FunctionDeclarationWithKey

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

2025-03-17 Thread Björn Schäpers via cfe-commits
@@ -349,6 +349,10 @@ bool ContinuationIndenter::canBreak(const LineState &State) { } } + // Don't break between function parameter keywords and parameter names HazardyKnusperkeks wrote: ```suggestion // Don't break between function parameter keyword

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

2025-03-17 Thread Björn Schäpers via cfe-commits
@@ -148,6 +160,24 @@ class AnnotatingParser { } } + const FormatStyle::FunctionDeclarationWithKeywords * + isInsideFunctionWithKeywordedParameters(const FormatToken &Token) const { +const FormatToken *Previous = &Token; +while (auto Prev = Previous->getPrevious

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

2025-03-17 Thread Björn Schäpers via cfe-commits
@@ -5247,6 +5247,41 @@ struct FormatStyle { /// \version 20 WrapNamespaceBodyWithEmptyLinesStyle WrapNamespaceBodyWithEmptyLines; + struct FunctionDeclarationWithKeywords { +std::string Name; +std::vector Keywords; + +bool operator==(const FunctionDeclarationW

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

2025-03-17 Thread Björn Schäpers via cfe-commits
@@ -82,6 +82,7 @@ namespace format { TYPE(FunctionAnnotationRParen) \ TYPE(FunctionDeclarationName) \ TYPE(FunctionDeclarationLParen)

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

2025-03-17 Thread Björn Schäpers via cfe-commits
@@ -1192,6 +1201,8 @@ template <> struct MappingTraits { Style.WhitespaceSensitiveMacros); IO.mapOptional("WrapNamespaceBodyWithEmptyLines", Style.WrapNamespaceBodyWithEmptyLines); +IO.mapOptional("FunctionDeclarationsWithKeywords",

[clang] 6f659b0 - [clang][dataflow] For bugprone-unchecked-optional-access report range (#131055)

2025-03-17 Thread via cfe-commits
Author: Jan Voung Date: 2025-03-17T16:04:15-04:00 New Revision: 6f659b0060d615435ceec53de407a8084656bc98 URL: https://github.com/llvm/llvm-project/commit/6f659b0060d615435ceec53de407a8084656bc98 DIFF: https://github.com/llvm/llvm-project/commit/6f659b0060d615435ceec53de407a8084656bc98.diff LOG

[clang] [HLSL] Add bounds checks for the HLSL `fmod` vector arguments and return types (PR #131035)

2025-03-17 Thread Sarah Spall via cfe-commits
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/131035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e3ef5f2 - [HLSL] Add bounds checks for the HLSL `fmod` vector arguments and return types (#131035)

2025-03-17 Thread via cfe-commits
Author: Kaitlin Peng Date: 2025-03-17T13:05:26-07:00 New Revision: e3ef5f2928f4077c48aebbddd288442d6ff76b62 URL: https://github.com/llvm/llvm-project/commit/e3ef5f2928f4077c48aebbddd288442d6ff76b62 DIFF: https://github.com/llvm/llvm-project/commit/e3ef5f2928f4077c48aebbddd288442d6ff76b62.diff

[clang] [HLSL] Implement min and max overloads using templates (PR #131666)

2025-03-17 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. LGTM! Unfortunate about the macros not working out but this alternative is pretty convenient. https://github.com/llvm/llvm-project/pull/131666 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [HLSL] Implement min and max overloads using templates (PR #131666)

2025-03-17 Thread Sarah Spall via cfe-commits
spall wrote: > LGTM! Unfortunate about the macros not working out but this alternative is > pretty convenient. They would have worked if we didn't need even more overloads! https://github.com/llvm/llvm-project/pull/131666 ___ cfe-commits mailing list

[clang] [clang-tools-extra] [clang][dataflow] For bugprone-unchecked-optional-access report range (PR #131055)

2025-03-17 Thread Jan Voung via cfe-commits
https://github.com/jvoung closed https://github.com/llvm/llvm-project/pull/131055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix UEFI Target info (PR #127290)

2025-03-17 Thread Tristan Ross via cfe-commits
@@ -835,16 +835,22 @@ class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo public: UEFIX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : UEFITargetInfo(Triple, Opts) { +LongWidth = LongAlign = 32; +DoubleAlign = LongLongAlign = 64; +Int

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

2025-03-17 Thread Mohamed Emad via cfe-commits
@@ -866,11 +878,15 @@ genHTML(const RecordInfo &I, Index &InfoIndex, const ClangDocContext &CDCtx, Out.emplace_back(std::make_unique(HTMLTag::TAG_H1, InfoTitle)); if (I.DefLoc) { -if (!CDCtx.RepositoryUrl) - Out.emplace_back(writeFileDefinition(*I.DefLoc)); -

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-17 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/131200 >From 1283ba24387e01aafcfc99e5db3f16c91deb5ac0 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Thu, 13 Mar 2025 15:52:23 -0400 Subject: [PATCH 1/7] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-03-17 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: @Meinersbur @petrhosek @smeenai @danliew-apple Reaching out here to some people who seem to have been working with this CMake file: Would you have any idea how I could activate and run the compiler-rt tests for s390x (see above for my unsuccessful experiments)? Thanks. https

[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-03-17 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: The test for this should actually go in `clang/test/SemaCXX/sugar-common-types.cpp`, following the style in the file. One example test, without using constexpr: https://godbolt.org/z/8PGa4aTPx ```C++ enum class Z {}; using ConstInt = const int; using ConstIntArray1 = ConstInt[1

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-17 Thread Michael Kruse via cfe-commits
@@ -101,3 +102,19 @@ bool PPCLinuxToolChain::SupportIEEEFloat128( return GlibcSupportsFloat128((Twine(D.DyldPrefix) + Linker).str()) && !(D.CCCIsCXX() && HasUnsupportedCXXLib); } + +void PPCLinuxToolChain::addFortranRuntimeLibs( +const ArgList &Args, llvm::opt::A

[clang] [Clang] Implement Wpointer-bool-conversion-strict (PR #131523)

2025-03-17 Thread Erich Keane via cfe-commits
erichkeane wrote: > > I can't for the life of me see a good way to use this. The `if(p)` pattern > > is so common that no code base could ever turn on this warning. We could > > PERHAPS check that we're in the process of checking a condition expression > > and suppress this diagnostic, or reco

[clang] [Headers] Create stub spirvintrin.h (PR #131164)

2025-03-17 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield updated https://github.com/llvm/llvm-project/pull/131164 >From d91671fdbb2aa9204f728747009459373bfd6553 Mon Sep 17 00:00:00 2001 From: Jon Chesterfield Date: Thu, 13 Mar 2025 15:44:52 + Subject: [PATCH 1/2] [Headers] Create stub spirintrin.h --- clang/li

[clang] [Clang] Constant Expressions inside of GCC' asm strings (PR #131003)

2025-03-17 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/131003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-17 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/131200 >From 1283ba24387e01aafcfc99e5db3f16c91deb5ac0 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Thu, 13 Mar 2025 15:52:23 -0400 Subject: [PATCH 1/9] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=

[clang] [Headers] Create stub spirvintrin.h (PR #131164)

2025-03-17 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield updated https://github.com/llvm/llvm-project/pull/131164 >From d91671fdbb2aa9204f728747009459373bfd6553 Mon Sep 17 00:00:00 2001 From: Jon Chesterfield Date: Thu, 13 Mar 2025 15:44:52 + Subject: [PATCH 1/2] [Headers] Create stub spirintrin.h --- clang/li

[clang] [clang-tools-extra] [clang][dataflow] For bugprone-unchecked-optional-access report range (PR #131055)

2025-03-17 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/131055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-17 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/131200 >From 1283ba24387e01aafcfc99e5db3f16c91deb5ac0 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Thu, 13 Mar 2025 15:52:23 -0400 Subject: [PATCH 1/8] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=

[clang] [Clang] Implement Wpointer-bool-conversion-strict (PR #131523)

2025-03-17 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I can't for the life of me see a good way to use this. The `if(p)` pattern is > so common that no code base could ever turn on this warning. We could PERHAPS > check that we're in the process of checking a condition expression and > suppress this diagnostic, or recognize

[clang] [HLSL] Add support for SV_GroupIndex in SPIR-V (PR #130672)

2025-03-17 Thread Steven Perron via cfe-commits
@@ -1,7 +1,8 @@ -// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -emit-llvm -disable-llvm-passes -o - -hlsl-entry main %s | FileCheck %s +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -emit-llvm -disable-llvm-passes -o - -hlsl-entry main %s

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

2025-03-17 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 17b4be8f63a9a2c17290c8540d84f17a370b1915 3cffb6a3c8a4bda050b56900d0333aed1cbe0216 --e

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-17 Thread via cfe-commits
@@ -5327,7 +5327,19 @@ void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity, } }; -switch(SAE->getKind()) { +auto MangleExtensionBuiltin = [&](const UnaryExprOrTypeTraitExpr *E, cor3ntin wrote: Nope, I need to factor it out n

[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)

2025-03-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/131626 WG14 N3353 added support for 0o and 0O as octal literal prefixes. It also deprecates use of octal literals without a prefix, except for the literal 0. This feature is being exposed as an extension in older

[clang] [HLSL] Add support for SV_GroupIndex in SPIR-V (PR #130672)

2025-03-17 Thread Steven Perron via cfe-commits
https://github.com/s-perron approved this pull request. https://github.com/llvm/llvm-project/pull/130672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedCallArgsChecker] os_log functions should be treated as safe. (PR #131500)

2025-03-17 Thread Ryosuke Niwa via cfe-commits
@@ -695,9 +695,13 @@ RefPtr object(); void someFunction(const RefCounted&); void test2() { -someFunction(*object()); + someFunction(*object()); } void system_header() { callMethod(object); } + +void log(RefCountable* obj) { + os_log_msg(os_log_create("WebKit", "D

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-17 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. https://github.com/llvm/llvm-project/pull/131200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement min and max overloads using templates (PR #131666)

2025-03-17 Thread Sarah Spall via cfe-commits
https://github.com/spall created https://github.com/llvm/llvm-project/pull/131666 Replace min and max overload implementation using macros with one using templates. Enable new overloads of the forms: vector min/max(vector p0, U p1) vector min/max(U p0, vector p1) vector min/max(vector p0, ve

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-17 Thread Alexander Richardson via cfe-commits
arichardson wrote: > @arichardson I found the way to override the cache file. Thanks for the > suggestion! Thanks this looks good to me. https://github.com/llvm/llvm-project/pull/131200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [HLSL] Implement min and max overloads using templates (PR #131666)

2025-03-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-backend-x86 Author: Sarah Spall (spall) Changes Replace min and max overload implementation using macros with one using templates. Enable new overloads of the forms: vector min/max(vector p0, U p1) vector min/m

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-17 Thread Alexander Richardson via cfe-commits
@@ -1187,16 +1187,19 @@ endif() # Build with _XOPEN_SOURCE on AIX, as stray macros in _ALL_SOURCE mode tend to # break things. In this case we need to enable the large-file API as well. if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX") - add_compile_definitions(_XOPEN_S

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-17 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/130976 >From 6f3557780d06d6a2b1a7f315c49a3ad533d821e5 Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Wed, 12 Mar 2025 11:23:19 -0400 Subject: [PATCH 1/2] [Coverage] Fix region termination for GNU statement expres

[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

2025-03-17 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks edited https://github.com/llvm/llvm-project/pull/131605 ___ 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-03-17 Thread Yaxun Liu via cfe-commits
@@ -84,31 +84,27 @@ OffloadTargetInfo::OffloadTargetInfo(const StringRef Target, : BundlerConfig(BC) { // TODO: Add error checking from ClangOffloadBundler.cpp - auto TargetFeatures = Target.split(':'); - auto TripleOrGPU = TargetFeatures.first.rsplit('-'); - - if (cl

[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)

2025-03-17 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks Aaron! https://github.com/llvm/llvm-project/pull/131626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Headers: prefer `corecrt_malloc.h` to `malloc.h` (PR #131668)

2025-03-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Saleem Abdulrasool (compnerd) Changes This allows us to target a lower level library (corecrt) rather than the higher level library (ucrt) which can be helpful in mordularising the SDK. --- Full diff: https://github.com/llvm/llvm-pr

<    1   2   3   4   5   6   >