[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-12-03 Thread via cfe-commits
@@ -2694,19 +2694,49 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg, } return MIB.constrainAllUses(TII, TRI, RBI); } - case Intrinsic::spv_loop_merge: - case Intrinsic::spv_selection_merge: { -const auto Opcode = IID == Intrinsic::spv_select

[clang] [ASTMatchers] AST matcher support for ObjC pointers (PR #117021)

2024-12-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-armv8-quick` running on `linaro-clang-armv8-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/154/builds/8421 Here is the relevant piece of

[clang] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly (PR #99687)

2024-12-03 Thread Joseph Huber via cfe-commits
jhuber6 wrote: it's also tough to say it's legal to drop the `amdhsa` in this case, because we rely on builtins that refer to things like implicit arguments, which are from HSA. Otherwise I would probably be fine just calling it `amdgcn`. https://github.com/llvm/llvm-project/pull/99687 ___

[clang] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (PR #118544)

2024-12-03 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/118544 We need to be able to propagate information about FMV attribute strings from C/C++ source to LLVM IR. This is necessary so that we can distinguish which target-features are coming from the cmdline, which are c

[clang] [Clang][Darwin] Centralize framework search paths for headers & libraries. (PR #118543)

2024-12-03 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/118543 * Use the centralized API to add `SubFrameworks` for driverkit targets. >From 764bf57ac39fddef74d45d16fffc14035bbbff72 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Tue, 3 Dec 2024 11:15:37 -0800 Subjec

[clang] [Clang][Darwin] Centralize framework search paths for headers & libraries. (PR #118543)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Cyndy Ishida (cyndyishida) Changes * Use the centralized API to add `SubFrameworks` for driverkit targets. --- Full diff: https://github.com/llvm/llvm-project/pull/118543.diff 5 Files Affected: - (modified) clang/include/clang/Ba

[clang] [Clang][Darwin] Centralize framework search paths for headers & libraries. (PR #118543)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) Changes * Use the centralized API to add `SubFrameworks` for driverkit targets. --- Full diff: https://github.com/llvm/llvm-project/pull/118543.diff 5 Files Affected: - (modified) clang/include/clang/Basic/Dar

[clang] [HLSL] get inout/out ABI for array parameters working (PR #111047)

2024-12-03 Thread Chris B via cfe-commits
@@ -5322,6 +5324,11 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, IRCallArgs[FirstIRArg] = Val; break; } + } else if (I->getType()->isArrayParameterType()) { +// use the tmp created by the HLSLOutArgExpr +/

[clang] [clang] Informative error for lifetimebound in decl-spec (PR #118567)

2024-12-03 Thread via cfe-commits
@@ -3703,8 +3703,14 @@ void Parser::ParseDeclarationSpecifiers( // We reject AT_LifetimeBound and AT_AnyX86NoCfCheck, even though they // are type attributes, because we historically haven't allowed these // to be used as type attributes in C++11

[clang] [Clang] Fix typo in ItaniumRecordLayoutBuilder API (PR #118563)

2024-12-03 Thread via cfe-commits
@@ -818,7 +818,7 @@ class ItaniumRecordLayoutBuilder { void setSize(CharUnits NewSize) { Size = Context.toBits(NewSize); } void setSize(uint64_t NewSize) { Size = NewSize; } - CharUnits getAligment() const { return Alignment; } + CharUnits getAlignment() const { return A

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-03 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/118455 >From 8b89f6a56e0921b13c8638c9768ec99945825840 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 3 Dec 2024 10:29:23 +0100 Subject: [PATCH 1/2] [Clang] Deleting an incomplete enum type is not an error T

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > I have no idea what is going on here... @AaronBallman probably needs to take > a better look. Else, could the author please give me an ELI5 sorta thing here > or show me what the change looks like on the generated stuff? Sure! This example will cover the docs used in the [above

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/118428 >From aea2b4001aa8e9239909875153152083b56a6a59 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Mon, 2 Dec 2024 21:25:54 -0800 Subject: [PATCH 1/2] Add support for referencable labels for attribute documentation

[clang] [Clang] Don't add top-level const qualifiers to captured function types (PR #118050)

2024-12-03 Thread Younan Zhang via cfe-commits
@@ -18789,7 +18792,11 @@ static bool captureInLambda(LambdaScopeInfo *LSI, ValueDecl *Var, // parameter-declaration-clause is not followed by mutable. DeclRefType = CaptureType.getNonReferenceType(); bool Const = LSI->lambdaCaptureShouldBeConst(); -if (Const

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-03 Thread via cfe-commits
@@ -766,6 +766,7 @@ Bug Fixes to C++ Support - Fixed an assertion failure caused by mangled names with invalid identifiers. (#GH112205) - Fixed an incorrect lambda scope of generic lambdas that caused Clang to crash when computing potential lambda captures at the end of a f

[clang] [llvm] [AArch64] Add initial support for FUJITSU-MONAKA (PR #118432)

2024-12-03 Thread Kinoshita Kotaro via cfe-commits
kinoshita-fj wrote: I prefer `-mcpu=fujitsu-monaka`. I want to include `fujitsu` because `FUJITSU-MONAKA` is the official name. I fixed the issues related to sve2aes. https://github.com/llvm/llvm-project/pull/118432 ___ cfe-commits mailing list cfe-c

[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)

2024-12-03 Thread Malavika Samak via cfe-commits
@@ -8,6 +8,5 @@ // main function int main(int argc, char *argv[]) { // expected-warning{{'argv' is an unsafe pointer used for buffer access}} char tmp; - tmp = argv[5][5];// expected-note{{used in buffer access here}} \ -

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > Out of curiosity, why does the existing mechanism not suffice? it "works" but creates the tag at the beginning of the text rather than the beginning of the attribute documentation. The result is that the scroll target for linking is the beginning of the text rather than the doc

[clang] [Clang][AST] Fix MS Mangle concept uneval context template instantiation crash (PR #117845)

2024-12-03 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/117845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 95566af - [Clang][AST] Fix MS Mangle concept uneval context template instantiation crash (#117845)

2024-12-03 Thread via cfe-commits
Author: Max Winkler Date: 2024-12-03T20:18:16-08:00 New Revision: 95566af789d208b8fc422644ab282a43911041f2 URL: https://github.com/llvm/llvm-project/commit/95566af789d208b8fc422644ab282a43911041f2 DIFF: https://github.com/llvm/llvm-project/commit/95566af789d208b8fc422644ab282a43911041f2.diff L

[clang] [Serialization] Downgrade error to warning for inconsistent language flags (PR #117840)

2024-12-03 Thread Michael Spencer via cfe-commits
Bigcheese wrote: I think going down this path is going to cause real issues for users. There's a reason this behavior was added in the first place for Clang modules, as Clang makes assumptions about the shape of the AST which can lead to crashes in some cases. For example, in real world code t

[clang] [llvm] [IR] Allow fast math flags on fptrunc and fpext (PR #115894)

2024-12-03 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/115894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

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

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-12-03 Thread Aaron Ballman via cfe-commits
@@ -1996,7 +1996,13 @@ This specifies that the underlying type, which is used to store the enumeration value, is ``unsigned char``. Use ``__has_feature(objc_fixed_enum)`` to determine whether support for fixed -underlying types is available in Objective-C. +underlying types i

[clang] Fix a bug with the hasAncestor AST matcher when a node has several parents without pointer identity (PR #118511)

2024-12-03 Thread Piotr Zegar via cfe-commits
@@ -1237,7 +1237,8 @@ class MatchASTVisitor : public RecursiveASTVisitor, // Make sure we do not visit the same node twice. // Otherwise, we'll visit the common ancestors as often as there // are splits on the way down. - if (Visited.inse

[clang] Fix a bug with the hasAncestor AST matcher when a node has several parents without pointer identity (PR #118511)

2024-12-03 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. In general change looks reasonable. https://github.com/llvm/llvm-project/pull/118511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [ASTMatchers] AST matcher support for ObjC pointers (PR #117021)

2024-12-03 Thread Rashmi Mudduluru via cfe-commits
t-rasmud wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/117021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add new tool: clang-read-diagnostics (PR #118522)

2024-12-03 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 bee33b5291a28aec76e98c0da25349266c7b653c e045e2db7367a0168d6fd40eace481d2074e91af --e

[clang] eb257fe - [OpenACC] Enable 3 more clauses for combined constructs.

2024-12-03 Thread via cfe-commits
Author: erichkeane Date: 2024-12-03T09:31:40-08:00 New Revision: eb257fe37ba1ea41bd162e2fbd0ee4cd33fcdcea URL: https://github.com/llvm/llvm-project/commit/eb257fe37ba1ea41bd162e2fbd0ee4cd33fcdcea DIFF: https://github.com/llvm/llvm-project/commit/eb257fe37ba1ea41bd162e2fbd0ee4cd33fcdcea.diff LO

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-12-03 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM aside from some suggested edits to the documentation. Mostly just adding full stops to the end of sentences, and a mention about the behavior of `__has_extension(c_fixed_enum)` in C23 and later. https://github.com/llvm/llvm-proje

[clang-tools-extra] Add new tool: clang-read-diagnostics (PR #118522)

2024-12-03 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 created https://github.com/llvm/llvm-project/pull/118522 As of today, one can make clang serialize diagnostics to a file with the flag `-serialize-diagnostics`. For example: ``` // file errors_and_warning.c #include int forgot_return() {} int main() { pri

[clang] Fix a bug with the hasAncestor AST matcher when a node has several parents without pointer identity (PR #118511)

2024-12-03 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/118511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add new tool: clang-read-diagnostics (PR #118522)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Yuxuan Chen (yuxuanchen1997) Changes As of today, one can make clang serialize diagnostics to a file with the flag `-serialize-diagnostics`. For example: ``` // file errors_and_warning.c #include int forgot_return()

[clang] [flang] [flang][Driver] Support -nostdlib and -nodefaultlibs (PR #108868)

2024-12-03 Thread Tarun Prabhu via cfe-commits
@@ -5572,7 +5572,8 @@ def : Flag<["-"], "nocudalib">, Alias; def gpulibc : Flag<["-"], "gpulibc">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, HelpText<"Link the LLVM C Library for GPUs">; def nogpulibc : Flag<["-"], "nogpulibc">, Visibility<[ClangOption, C

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Out of curiosity, why does the existing mechanism not suffice? https://github.com/llvm/llvm-project/pull/118428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [ASTMatchers] AST matcher support for ObjC pointers (PR #117021)

2024-12-03 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud updated https://github.com/llvm/llvm-project/pull/117021 >From f624a90eb8c893d5de16d0426c2884ca03ccbd4c Mon Sep 17 00:00:00 2001 From: Rashmi Mudduluru Date: Tue, 19 Nov 2024 14:50:24 -0800 Subject: [PATCH] [ASTMatchers] AST matcher support for ObjC pointers Add `Ob

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-12-03 Thread David Blaikie via cfe-commits
@@ -1353,6 +1353,19 @@ void CodeGenFunction::EmitLifetimeEnd(llvm::Value *Size, llvm::Value *Addr) { C->setDoesNotThrow(); } +void CodeGenFunction::EmitFakeUse(Address Addr) { + // We do not emit a fake use if we want to apply optnone to this function, + // even if we mig

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Aaron Ballman via cfe-commits
@@ -55,6 +55,9 @@ class Documentation { // When set, specifies that the attribute is deprecated and can optionally // specify a replacement attribute. DocDeprecated Deprecated; + + // When set, specifies a label that can be used to reference the documentation --

[libclc] [libcxx] [llvm] [openmp] [polly] [llvm] Move sub-project lead maintainers into their own Maintainers.md files (PR #118309)

2024-12-03 Thread Nikita Popov via cfe-commits
nikic wrote: Looks like some openmp maintainers have been proposed in https://github.com/llvm/llvm-project/pull/118521. Do we want to let that land first or integrate it here? (cc @nawrinsu) https://github.com/llvm/llvm-project/pull/118309 ___ cfe-co

[clang-tools-extra] [clang-tidy][docs] improve documentation on cppcoreguidelines-narrowing-conversions (#111510) (PR #118209)

2024-12-03 Thread Jonas Toth via cfe-commits
https://github.com/JonasToth updated https://github.com/llvm/llvm-project/pull/118209 >From 4340df440863de154ed305dc487d23ef46c9277a Mon Sep 17 00:00:00 2001 From: Jonas Toth Date: Sun, 1 Dec 2024 12:02:13 +0100 Subject: [PATCH 1/2] [clang-tidy][docs] improve documentation on cppcoreguidelines

[clang] Add support for referencable labels for attribute documentation (PR #118428)

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

[clang] [clang] Fix crash when compiling error with invalid decl (PR #77893)

2024-12-03 Thread Shafik Yaghmour via cfe-commits
@@ -40,7 +40,11 @@ static_assert( "Type is insufficiently aligned"); APValue::LValueBase::LValueBase(const ValueDecl *P, unsigned I, unsigned V) -: Ptr(P ? cast(P->getCanonicalDecl()) : nullptr), Local{I, V} {} +: Ptr(P ? cast(P->getCanonicalDecl()->isInvalidDecl()

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic (PR #118580)

2024-12-03 Thread Adam Yang via cfe-commits
https://github.com/adam-yang edited https://github.com/llvm/llvm-project/pull/118580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic (PR #118580)

2024-12-03 Thread Adam Yang via cfe-commits
https://github.com/adam-yang edited https://github.com/llvm/llvm-project/pull/118580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME] Fix bug on SMELd1St1 (PR #118109)

2024-12-03 Thread via cfe-commits
wwwatermiao wrote: Hi, @momchil-velikov, Hi, @CarolineConcatto, can you help me to review this patch plz? Thank you! https://github.com/llvm/llvm-project/pull/118109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [llvm] Add processor aliases back to -print-supported-cpus and -mcpu=help (PR #118581)

2024-12-03 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs created https://github.com/llvm/llvm-project/pull/118581 They were accidentally dropped in https://github.com/llvm/llvm-project/pull/96249 rdar://140853882 >From 46775c380244e47ddd9a3188651f37c3a3b33d23 Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 3 Dec 2

[clang] [llvm] Add processor aliases back to -print-supported-cpus and -mcpu=help (PR #118581)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc @llvm/pr-subscribers-clang Author: Jon Roelofs (jroelofs) Changes They were accidentally dropped in https://github.com/llvm/llvm-project/pull/96249 rdar://140853882 --- Full diff: https://github.com/llvm/llvm-project/pull/118581.diff 6 Files Affe

[clang] [llvm] Add processor aliases back to -print-supported-cpus and -mcpu=help (PR #118581)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Jon Roelofs (jroelofs) Changes They were accidentally dropped in https://github.com/llvm/llvm-project/pull/96249 rdar://140853882 --- Full diff: https://github.com/llvm/llvm-project/pull/118581.diff 6 Files Affected: - (modifie

[clang] [llvm] Add processor aliases back to -print-supported-cpus and -mcpu=help (PR #118581)

2024-12-03 Thread Jon Roelofs via cfe-commits
@@ -25,3 +26,12 @@ // CHECK-ARM: cortex-a73 // CHECK-ARM: cortex-a75 // CHECK-ARM: Use -mcpu or -mtune to specify the target's processor. + +// RUN: %clang --target=arm64-apple-macosx --print-supported-cpus 2>&1 | \ +// RUN: FileCheck %s --check-prefix=CHECK-AARCH64 --implic

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-12-03 Thread via cfe-commits
@@ -0,0 +1,731 @@ +//===-- Mustache.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] [Serialization] Downgrade error to warning for inconsistent language flags (PR #117840)

2024-12-03 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > I see, so because we no longer allow inconsistent options when importing, > > we now issue a lot of error diagnostics. But for many of the options, > > differences between TUs should have no impact on modules anyway, and so > > those errors are false positives. Is that ab

[clang] [clang][modules] Fix std::initializer_list recognition if it's exported out of a module (PR #118537)

2024-12-03 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/118537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Fix std::initializer_list recognition if it's exported out of a module (PR #118537)

2024-12-03 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: The overall idea looks good. But the implementation may be improved. I didn't look at the implementation of std module in MSVC. But I am guess it is because the clang compiler failed to skip the transparent `export` or `language linkage` context. If y

[clang] [clang][modules] Fix std::initializer_list recognition if it's exported out of a module (PR #118537)

2024-12-03 Thread Chuanqi Xu via cfe-commits
@@ -11919,8 +11919,12 @@ bool Sema::isStdInitializerList(QualType Ty, QualType *Element) { CXXRecordDecl *TemplateClass = Template->getTemplatedDecl(); if (TemplateClass->getIdentifier() != &PP.getIdentifierTable().get("initializer_list") || -!getSt

[clang] [clang][modules] Fix std::initializer_list recognition if it's exported out of a module (PR #118537)

2024-12-03 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/118537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] {Clang] Fix typo in ItaniumRecordLayoutBuilder API (PR #118561)

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

[clang] {Clang] Fix typo in ItaniumRecordLayoutBuilder API (PR #118561)

2024-12-03 Thread Eric Wang via cfe-commits
https://github.com/Ptkyr created https://github.com/llvm/llvm-project/pull/118561 None >From 26596a6be92de4a5f2c94cf12e05d37739f47749 Mon Sep 17 00:00:00 2001 From: Eric Wang <48936088+pt...@users.noreply.github.com> Date: Tue, 3 Dec 2024 18:57:28 -0500 Subject: [PATCH] {Clang] Fix typo in Itan

[clang] {Clang] Fix typo in ItaniumRecordLayoutBuilder API (PR #118561)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eric Wang (Ptkyr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/118561.diff 1 Files Affected: - (modified) clang/lib/AST/RecordLayoutBuilder.cpp (+1-1) ``diff diff --git a/clang/lib/AST/RecordLayoutBuilder

[clang] {Clang] Fix typo in ItaniumRecordLayoutBuilder API (PR #118561)

2024-12-03 Thread Eric Wang via cfe-commits
https://github.com/Ptkyr closed https://github.com/llvm/llvm-project/pull/118561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Sync ContainerSizeEmptyCheck with container-size-empty doc (PR #118459)

2024-12-03 Thread Niels Dekker via cfe-commits
https://github.com/N-Dekker updated https://github.com/llvm/llvm-project/pull/118459 >From 1e2cb1158f66fe5e1abff5cfe5a2134eed3a7f51 Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Tue, 3 Dec 2024 11:02:59 +0100 Subject: [PATCH] [clang-tidy] Sync ContainerSizeEmptyCheck with container-size-em

[clang] [Clang] Fix typo in ItaniumRecordLayoutBuilder API (PR #118563)

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

[clang] [Clang] Fix typo in ItaniumRecordLayoutBuilder API (PR #118563)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eric Wang (Ptkyr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/118563.diff 1 Files Affected: - (modified) clang/lib/AST/RecordLayoutBuilder.cpp (+1-1) ``diff diff --git a/clang/lib/AST/RecordLayoutBuilder

[clang] [Clang] Fix typo in ItaniumRecordLayoutBuilder API (PR #118563)

2024-12-03 Thread Eric Wang via cfe-commits
https://github.com/Ptkyr created https://github.com/llvm/llvm-project/pull/118563 None >From 6d723faf919c3fe3788700a5fc639ebd856aa6d7 Mon Sep 17 00:00:00 2001 From: Eric Wang <48936088+pt...@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:04:14 -0500 Subject: [PATCH] [Clang] Fix typo in Itan

[clang] [clang-format] extend clang-format directive with options to prevent formatting for one line (PR #118566)

2024-12-03 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/118566 Fixes #54334 >From 8bae39299284dffd592bbf32374929e4a6f2d3ff Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 4 Dec 2024 02:24:12 +0200 Subject: [PATCH] [clang-format] extend clang-format directive with

[clang] 35cce40 - [WebAssembly] Support the new "Lime1" CPU (#112035)

2024-12-03 Thread via cfe-commits
Author: Dan Gohman Date: 2024-12-03T16:35:23-08:00 New Revision: 35cce408eef1a253df12c0023c993d78b180b1f3 URL: https://github.com/llvm/llvm-project/commit/35cce408eef1a253df12c0023c993d78b180b1f3 DIFF: https://github.com/llvm/llvm-project/commit/35cce408eef1a253df12c0023c993d78b180b1f3.diff LO

[clang] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-12-03 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode closed https://github.com/llvm/llvm-project/pull/112035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Informative error for lifetimebound in decl-spec (PR #118567)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Maksim Ivanov (emaxx-google) Changes Emit a bit more informative error when the `[[clang::lifetimebound]]` attribute is wrongly appearing on a decl-spec: "'lifetimebound' attribute only applies to parameters and implicit object paramete

[clang] 410cbe3 - [AMDGPU] Use COV6 by default (#118515)

2024-12-03 Thread via cfe-commits
Author: Shilei Tian Date: 2024-12-03T19:38:35-05:00 New Revision: 410cbe3cf28913cca2fc61b3437306b841d08172 URL: https://github.com/llvm/llvm-project/commit/410cbe3cf28913cca2fc61b3437306b841d08172 DIFF: https://github.com/llvm/llvm-project/commit/410cbe3cf28913cca2fc61b3437306b841d08172.diff L

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2024-12-03 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,7 @@ +; RUN: llc -mtriple=amdgcn-amd-amdhsa %s -o - | FileCheck %s + +; CHECK: .amdhsa_code_object_version 6 shiltian wrote: ah, they check the IR match Lol. I will add one later then. https://github.com/llvm/llvm-project/pull/118515 _

[clang] [clang] Informative error for lifetimebound in decl-spec (PR #118567)

2024-12-03 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google created https://github.com/llvm/llvm-project/pull/118567 Emit a bit more informative error when the `[[clang::lifetimebound]]` attribute is wrongly appearing on a decl-spec: "'lifetimebound' attribute only applies to parameters and implicit object parameters",

[clang] [clang] Informative error for lifetimebound in decl-spec (PR #118567)

2024-12-03 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: @hokein @ilya-biryukov https://github.com/llvm/llvm-project/pull/118567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][www] Remove ClangDataFormat.py from docs (PR #117943)

2024-12-03 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: @Michael137 https://github.com/llvm/llvm-project/pull/117943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

2024-12-03 Thread Scott Constable via cfe-commits
scottconstable wrote: Hi @maurer, I can honestly say that I appreciate your attention to detail. While your observation that "attackers often have direct control of intentionally passed arguments" is true in general, I do not see evidence of this among indirect calls in the Linux kernel. 77% o

[clang-tools-extra] Add new tool: clang-read-diagnostics (PR #118522)

2024-12-03 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: %clang %s -serialize-diagnostics %s.diag || true jroelofs wrote: ```suggestion // RUN: not %clang %s -serialize-diagnostics %s.diag ``` https://github.com/llvm/llvm-project/pull/118522 ___ cfe

[clang] [llvm] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

2024-12-03 Thread Scott Constable via cfe-commits
scottconstable wrote: I also do not want to lose sight of one of the other obvious advantages that was mentioned in the PR description: > One additional benefit of this patch is that it can benefit other CFI > approaches that build on kCFI, such as FineIBT. For example, this proposed > enhanc

[clang] [ast matcher] add `ExportDecl` in dynamically matchers (PR #118258)

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/118258 >From f9fbb478194a429f1879c176504b8596312b9baf Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 2 Dec 2024 14:08:47 +0800 Subject: [PATCH 1/2] [ast matcher] add `ExportDecl` in dynamically matchers --

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2024-12-03 Thread Matt Arsenault via cfe-commits
@@ -34,7 +34,7 @@ static llvm::cl::opt DefaultAMDHSACodeObjectVersion( "amdhsa-code-object-version", llvm::cl::Hidden, -llvm::cl::init(llvm::AMDGPU::AMDHSA_COV5), +llvm::cl::init(llvm::AMDGPU::AMDHSA_COV6), arsenm wrote: Actually this is broken, t

[clang] [ast matcher] add `ExportDecl` in dynamically matchers (PR #118258)

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/118258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2024-12-03 Thread Matt Arsenault via cfe-commits
@@ -34,7 +34,7 @@ static llvm::cl::opt DefaultAMDHSACodeObjectVersion( "amdhsa-code-object-version", llvm::cl::Hidden, -llvm::cl::init(llvm::AMDGPU::AMDHSA_COV5), +llvm::cl::init(llvm::AMDGPU::AMDHSA_COV6), arsenm wrote: The .amdhsa_code_object_ve

[clang] c7d3859 - [ast matcher] add `ExportDecl` in dynamically matchers (#118258)

2024-12-03 Thread via cfe-commits
Author: Congcong Cai Date: 2024-12-04T06:43:29+08:00 New Revision: c7d38591be8b5c581c228313d2972cb758221cc2 URL: https://github.com/llvm/llvm-project/commit/c7d38591be8b5c581c228313d2972cb758221cc2 DIFF: https://github.com/llvm/llvm-project/commit/c7d38591be8b5c581c228313d2972cb758221cc2.diff

[clang-tools-extra] [NFC] Fix potential underflow constant. (PR #118528)

2024-12-03 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/118528 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2024-12-03 Thread Michael Jabbour via cfe-commits
michael-jabbour-sonarsource wrote: Gentle ping :smile: I would love to hear your feedback, and if any changes are needed, I am happy to address them promptly. https://github.com/llvm/llvm-project/pull/114240 ___ cfe-commits mailing list cfe-commits@l

[clang] [HLSL] Implement `Append` and `Consume` methods on `Append`/`ConsumeStructuredBuffer` (PR #118536)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Helena Kotas (hekota) Changes The methods are using existing clang builtins `__builtin_hlsl_buffer_update_counter` and `__builtin_hlsl_resource_getpointer` to update the buffer counter and then load or store the value. Fixes #112968 ---

[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)

2024-12-03 Thread via cfe-commits
https://github.com/jkorous-apple requested changes to this pull request. https://github.com/llvm/llvm-project/pull/118249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)

2024-12-03 Thread via cfe-commits
@@ -8,6 +8,5 @@ // main function int main(int argc, char *argv[]) { // expected-warning{{'argv' is an unsafe pointer used for buffer access}} char tmp; - tmp = argv[5][5];// expected-note{{used in buffer access here}} \ -

[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)

2024-12-03 Thread via cfe-commits
jkorous-apple wrote: We want to suppress warnings for subscript operator on multi-dimensional constant size arrays (not `array[]`) only where the index used is constant and within bounds. You changes some test cases where multi-dimensional pointers are accessed. For those the upper bound is un

[clang] [HLSL] get inout/out ABI for array parameters working (PR #111047)

2024-12-03 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/111047 >From 119def060924f13bd1fe07f6d73ce27a1b52ea12 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Tue, 17 Sep 2024 20:25:46 + Subject: [PATCH 1/8] theoretically fix issue --- clang/lib/Sema/SemaType.cpp | 4 ++

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-12-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/13023

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-12-03 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: That issue should be resolved by 25b1896686177673dcd548489e92c7880d576948 https://github.com/llvm/llvm-project/pull/117507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [ASTMatchers] AST matcher support for ObjC pointers (PR #117021)

2024-12-03 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud updated https://github.com/llvm/llvm-project/pull/117021 >From 8cbc2754a4525d35dac720c283efaea1167deb9d Mon Sep 17 00:00:00 2001 From: Rashmi Mudduluru Date: Tue, 19 Nov 2024 14:50:24 -0800 Subject: [PATCH] [ASTMatchers] AST matcher support for ObjC pointers Add `Ob

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-03 Thread Helmut Januschka via cfe-commits
@@ -0,0 +1,24 @@ +.. title:: clang-tidy - readability-use-span-first-last + +readability-use-span-first-last +=== + +Checks for uses of ``std::span::subspan()`` that can be replaced with clearer +``first()`` or ``last()`` member functions. These dedicat

[clang] [Clang] Diagnose down casting static_cast (PR #117914)

2024-12-03 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Generally LGTM but we're missing test coverage for the `; did you mean 'dynamic_cast'?` part of the diagnostic message. It'd be good to have a test with `-frtti` and `-fno-rtti` showing that we do the right thing there, including with the fix-it sugge

[clang] [Clang] [Sema] Reject non-power-of-2 `_BitInt` matrix element types (PR #117487)

2024-12-03 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > an integer type (as in C23 6.2.5p22) > > Doesn’t 6.2.5p22 include 6.2.5.p5 i.e. `_BitInt`s? > > CC @AaronBallman That's correct, `_BitInt` is an `integer type` in C's words of power. https://github.com/llvm/llvm-project/pull/117487 _

[clang] [clang-repl][CMake][MSVC] Use LINKER: instead of `-Wl` (PR #118518)

2024-12-03 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/118518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [NFC] Fix potential underflow constant. (PR #118528)

2024-12-03 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam created https://github.com/llvm/llvm-project/pull/118528 None >From 59904d85cece9758dbb449ae4180ee5f917d0263 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Tue, 3 Dec 2024 10:53:22 -0800 Subject: [PATCH] [NFC] Fix potential underflow constant. --- .../bu

[clang] [Clang] Fix -Wunused-private-field false negative with defaulted comparison operators (PR #116871)

2024-12-03 Thread Mészáros Gergely via cfe-commits
Maetveis wrote: Hey, @whiteio I'm sorry the review is taking long, Aaron was off for the holidays. In the meantime it looks like some conflicts came up, are you comfortable resolving those or do you need help? I'll ping Aaron or find some other front-end reviewer once the conflicts are resolv

[clang-tools-extra] Add new tool: clang-read-diagnostics (PR #118522)

2024-12-03 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/118522 >From 5860f5f25e04930c72dcdb9f0ee4d7386cbcb3d3 Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Mon, 2 Dec 2024 15:15:30 -0800 Subject: [PATCH 1/6] start working on the new tool --- .../clang-read-diagn

[clang] FunctionDecl::getFunctionTypeLoc: ignore function type attributes (PR #118420)

2024-12-03 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Also needs tests here, plus perhaps a release note if this is something externally visible. https://github.com/llvm/llvm-project/pull/118420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] FunctionDecl::getFunctionTypeLoc: ignore function type attributes (PR #118420)

2024-12-03 Thread Erich Keane via cfe-commits
@@ -3876,8 +3876,17 @@ bool FunctionDecl::doesDeclarationForceExternallyVisibleDefinition() const { FunctionTypeLoc FunctionDecl::getFunctionTypeLoc() const { const TypeSourceInfo *TSI = getTypeSourceInfo(); - return TSI ? TSI->getTypeLoc().IgnoreParens().getAs() -

[clang] [HLSL] Implement `Append` and `Consume` methods on `Append`/`ConsumeStructuredBuffer` (PR #118536)

2024-12-03 Thread Justin Bogner via cfe-commits
@@ -674,6 +700,34 @@ BuiltinTypeDeclBuilder::addHandleAccessFunction(DeclarationName &Name, .finalizeMethod(); } +BuiltinTypeDeclBuilder &BuiltinTypeDeclBuilder::addAppendMethod() { + using PH = BuiltinTypeMethodBuilder::PlaceHolder; + ASTContext &AST = SemaRef.getAST

<    1   2   3   4   5   6   >