[clang-tools-extra] [clang-tidy] Create bugprone-bit-cast-pointers check (PR #108083)

2024-10-02 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/108083 >From 7c50e702c087047adfe43137d52e56cb98ff9918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Tue, 10 Sep 2024 13:46:51 + Subject: [PATCH] [clang-tidy] Create bugprone-bitwise-po

[clang-tools-extra] [clang-tidy] Create bugprone-bit-cast-pointers check (PR #108083)

2024-10-02 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp edited https://github.com/llvm/llvm-project/pull/108083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Create bugprone-bitwise-pointer-cast check (PR #108083)

2024-10-02 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp edited https://github.com/llvm/llvm-project/pull/108083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Create bugprone-bitwise-pointer-cast check (PR #108083)

2024-10-02 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > Both sound good to me. Great, updated! Let me know there's anything else to fix or if we can merge. https://github.com/llvm/llvm-project/pull/108083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code without relying on target-dependent overload resolution (PR #109663)

2024-10-02 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > > I don't think we should rely on these on the host at all, the addition was > > a design mistake initially, we probably should not double down on it. > > I agree with it in principle. However, removing things that already exist > should be done with consideration for the exis

[libunwind] 3a6b895 - [libunwind] Fix libunwind library path for runtime test (#110777)

2024-10-02 Thread via cfe-commits
Author: Haowei Date: 2024-10-02T14:52:58-04:00 New Revision: 3a6b89540efeb53d3c7e26986a523dc7184aa0f4 URL: https://github.com/llvm/llvm-project/commit/3a6b89540efeb53d3c7e26986a523dc7184aa0f4 DIFF: https://github.com/llvm/llvm-project/commit/3a6b89540efeb53d3c7e26986a523dc7184aa0f4.diff LOG: [

[libunwind] [libunwind] Fix libunwind library path for runtime test (PR #110777)

2024-10-02 Thread Louis Dionne via cfe-commits
https://github.com/ldionne closed https://github.com/llvm/llvm-project/pull/110777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Fix libunwind library path for runtime test (PR #110777)

2024-10-02 Thread Louis Dionne via cfe-commits
ldionne wrote: > > This can be merged by whoever sees the CI green first. > > There are 6 failing build so far but all due to the "runner received a > shutdown signal", not actually a build/test failure? Should I do another > rebase to trigger a rerun? Or we can just land it now? Merged since

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-10-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Still LGTM https://github.com/llvm/llvm-project/pull/102602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-02 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From ef969c536d700a8585f0892952fae49cdd9c42d1 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH 01/12] Codegen builtin --- clang/include/clang/Basic/Builtin

[clang] [clang][MicrosoftCXXABI] Avoid Type::getPointerTo() (NFC) (PR #110915)

2024-10-02 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/110915 `llvm::Type::getPointerTo()` is to be deprecated & removed soon. >From 1aa33200fc6b9d6222fd160ae63d8ba2255e69d5 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Wed, 2 Oct 2024 13:49:18 -0500 Subject: [PATCH]

[clang] 39851e3 - [clang][dataflow] Add a test demonstrating an issue in unchecked-optional-access-check (#110870)

2024-10-02 Thread via cfe-commits
Author: Jan Voung Date: 2024-10-02T15:04:35-04:00 New Revision: 39851e3a4641864ce29c7066bf304ae0be325f33 URL: https://github.com/llvm/llvm-project/commit/39851e3a4641864ce29c7066bf304ae0be325f33 DIFF: https://github.com/llvm/llvm-project/commit/39851e3a4641864ce29c7066bf304ae0be325f33.diff LOG

[clang] [clang][MicrosoftCXXABI] Avoid Type::getPointerTo() (NFC) (PR #110915)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Youngsuk Kim (JOE1994) Changes `llvm::Type::getPointerTo()` is to be deprecated & removed soon. --- Full diff: https://github.com/llvm/llvm-project/pull/110915.diff 1 Files Affected: - (modified) clang/lib/CodeGen/MicrosoftCXXABI.cpp (+

[clang] [clang][dataflow] Add a test demonstrating an issue in unchecked-optional-access-check (PR #110870)

2024-10-02 Thread Jan Voung via cfe-commits
https://github.com/jvoung closed https://github.com/llvm/llvm-project/pull/110870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Multilib error fixes (PR #110804)

2024-10-02 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm updated https://github.com/llvm/llvm-project/pull/110804 >From 531253ab8c33cc69a927b28a1608675cd9ef709c Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 30 Sep 2024 16:12:00 +0100 Subject: [PATCH 1/2] [clang][Driver] Rename "FatalError" key to "Error" in mu

[clang] [clang][HLSL] Add radians intrinsic (PR #110802)

2024-10-02 Thread Adam Yang via cfe-commits
https://github.com/adam-yang ready_for_review https://github.com/llvm/llvm-project/pull/110802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Multilib error fixes (PR #110804)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Simon Tatham (statham-arm) Changes This PR contains two separate patches updating the "custom error message" feature in `multilib.yaml` (#105684): * Change the YAML keyword `FatalError` to `Error`, as @petrhosek requested after th

[clang] Multilib error fixes (PR #110804)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Simon Tatham (statham-arm) Changes This PR contains two separate patches updating the "custom error message" feature in `multilib.yaml` (#105684): * Change the YAML keyword `FatalError` to `Error`, as @petrhosek requested after the previ

[clang] [clang][HLSL] Add radians intrinsic (PR #110802)

2024-10-02 Thread Adam Yang via cfe-commits
https://github.com/adam-yang updated https://github.com/llvm/llvm-project/pull/110802 >From be88a591ed220714b21b73e34406bfcdb866ac17 Mon Sep 17 00:00:00 2001 From: Adam Yang Date: Wed, 2 Oct 2024 01:21:19 -0700 Subject: [PATCH 1/2] Added radians to clang --- clang/include/clang/Basic/Builtins

[clang] Multilib error fixes (PR #110804)

2024-10-02 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm created https://github.com/llvm/llvm-project/pull/110804 This PR contains two separate patches updating the "custom error message" feature in `multilib.yaml` (#105684): * Change the YAML keyword `FatalError` to `Error`, as @petrhosek requested after the previous

[clang] Multilib error fixes (PR #110804)

2024-10-02 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 f9fbfc587d793b25e5f3ea0c8fa1db949085b158 765e431243b8ee6df9e118d7c1b21b270bf68c11 --e

[clang] [clang][HLSL] Add radians intrinsic (PR #110802)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Adam Yang (adam-yang) Changes partially fixes #99151 ### Changes * Implemented `radians` clang builtin * Linked `radians` clang builtin with `hlsl_intrinsics.h` * Added sema checks for `radians` to `CheckHLSLBuiltinFunctionCall` in `SemaC

[clang] [clang][analyzer] Less redundant warnings from FixedAddressChecker (PR #110458)

2024-10-02 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. Thanks for the update, I think you can merge this now. https://github.com/llvm/llvm-project/pull/110458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] 95f00a6 - [IR] Allow fast math flags on calls with homogeneous FP struct types (#110506)

2024-10-02 Thread via cfe-commits
Author: Benjamin Maxwell Date: 2024-10-02T10:05:09+01:00 New Revision: 95f00a63ce68f5df4c8447fa418be9255898f9c6 URL: https://github.com/llvm/llvm-project/commit/95f00a63ce68f5df4c8447fa418be9255898f9c6 DIFF: https://github.com/llvm/llvm-project/commit/95f00a63ce68f5df4c8447fa418be9255898f9c6.di

[clang] [llvm] [IR] Allow fast math flags on calls with homogeneous FP struct types (PR #110506)

2024-10-02 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue closed https://github.com/llvm/llvm-project/pull/110506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HLSL] Add radians intrinsic (PR #110802)

2024-10-02 Thread Farzon Lotfi via cfe-commits
@@ -18852,6 +18852,14 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: { retType, CGM.getHLSLRuntime().getSignIntrinsic(), ArrayRef{Op0}, nullptr, "hlsl.sign"); } + case Builtin::BI__builtin_hlsl_elementwise_radians: { +Value *Op0 = EmitScalarExpr(E->

[clang] [clang][HLSL] Add radians intrinsic (PR #110802)

2024-10-02 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected + +float test_too_few_arg() { + return __builtin_hlsl_elementwise_radians(); + // e

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code without relying on target-dependent overload resolution (PR #109663)

2024-10-02 Thread Alex Voicu via cfe-commits
AlexVlx wrote: Just because somebody wrote something we should not assume it is necessarily sound or valid. Is there some illustration of said valid uses / have the users made an argument around why they absolutely must have the macro? CUDA doesn't have a macro like this at all AFAIK, and ever

[clang] [clang][HLSL] Add radians intrinsic (PR #110802)

2024-10-02 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/110802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-10-02 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag updated https://github.com/llvm/llvm-project/pull/102602 >From 7b4f999b39f4308cab253204e6be41ea7a70f695 Mon Sep 17 00:00:00 2001 From: Pavel Skripkin Date: Fri, 9 Aug 2024 14:37:47 +0300 Subject: [PATCH 01/11] clang/csa: add initial support for builtin overflow ---

[clang] [clang][HLSL] Add radians intrinsic (PR #110802)

2024-10-02 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 4980f2177e5c1b68afc8249c52523cc0a38ecf1c 8776e6033a64350426e7d7ef05ce0a504357446c --e

[clang] [clang][HLSL] Add radians intrinsic (PR #110802)

2024-10-02 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl requested changes to this pull request. Please run clang-format https://github.com/llvm/llvm-project/pull/110802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-10-02 Thread Keith Packard via cfe-commits
https://github.com/keith-packard updated https://github.com/llvm/llvm-project/pull/108942 >From f91cf985d10a07af617b6098f50d023108d060a4 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 2 Oct 2024 12:37:30 -0700 Subject: [PATCH 1/5] [RISCV][ISelLowering] Use getModule() instead of getPa

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-10-02 Thread Keith Packard via cfe-commits
keith-packard wrote: I've retitled the commit messages to match llvm conventions and added a clean-up to replace another instance of `getParent()->getParent()` with `getModule()`. https://github.com/llvm/llvm-project/pull/108942 ___ cfe-commits maili

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-10-02 Thread Damyan Pepper via cfe-commits
@@ -1704,6 +1704,20 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { return true; break; } + case Builtin::BI__builtin_hlsl_cross: { +if (SemaRef.checkArgCount(TheCall, 2)) + return true; +if (CheckVectorElementCallA

[clang] [Clang] [Sema] Don't crash on unexpanded pack in invalid block literal (PR #110762)

2024-10-02 Thread Haojian Wu via cfe-commits
hokein wrote: The current solution seems reasonable to me. > somehow including the malformed block in the AST (by wrapping it in a > RecoveryExpr perhaps?) `RecoveryExpr` is designed to preserve `Expr` nodes, so it can't be used to retain arbitrary AST nodes. In the case of `(^Ts)`, as far as

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-10-02 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/109180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 65e69f7 - [NFC][TableGen] Change `Record::getSuperClasses` to use const Record* (#110845)

2024-10-02 Thread via cfe-commits
Author: Rahul Joshi Date: 2024-10-02T13:24:46-07:00 New Revision: 65e69f7436c08bb6a32a9d9784b2158b63af1955 URL: https://github.com/llvm/llvm-project/commit/65e69f7436c08bb6a32a9d9784b2158b63af1955 DIFF: https://github.com/llvm/llvm-project/commit/65e69f7436c08bb6a32a9d9784b2158b63af1955.diff L

[clang] [llvm] [mlir] [NFC][TableGen] Change `Record::getSuperClasses` to use const Record* (PR #110845)

2024-10-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/110845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-10-02 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. LGTM, and I see you've addressed all of the feedback. Would be good to check @bogner is happy with the resolution of [this issue](https://github.com/llvm/llvm-project/pull/109180#discussion_r1781967896) before merging. https://github.com/

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-10-02 Thread Joshua Batista via cfe-commits
@@ -74,6 +75,42 @@ static Value *expandAbs(CallInst *Orig) { "dx.max"); } +static Value *expandCrossIntrinsic(CallInst *Orig) { + + VectorType *VT = cast(Orig->getType()); + if (cast(VT)->getNumElements() != 3) +report_fatal_error(Twine("

[clang] Reapply "[clang][CodeGen] Zero init unspecified fields in initializers in C" (#109898) (PR #110051)

2024-10-02 Thread Eli Friedman via cfe-commits
@@ -1774,6 +1805,50 @@ void AggExprEmitter::VisitCXXParenListOrInitListExpr( } } } + if (ZeroInitPadding) { +uint64_t TotalSize = CGF.getContext().toBits( +Dest.getPreferredSize(CGF.getContext(), DestLV.getType())); +DoZeroInitPadding(BaseAddr, Last

[clang] Reapply "[clang][CodeGen] Zero init unspecified fields in initializers in C" (#109898) (PR #110051)

2024-10-02 Thread Eli Friedman via cfe-commits
@@ -1774,6 +1805,50 @@ void AggExprEmitter::VisitCXXParenListOrInitListExpr( } } } + if (ZeroInitPadding) { +uint64_t TotalSize = CGF.getContext().toBits( +Dest.getPreferredSize(CGF.getContext(), DestLV.getType())); +DoZeroInitPadding(BaseAddr, Last

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-10-02 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/109180 >From 3c58861f3e8c2f1333d0b36c6f5b7ba7f3d9e187 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 18 Sep 2024 12:20:19 -0700 Subject: [PATCH 1/8] add cross hlsl function --- clang/include/clang/Basic/Bu

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-02 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/110761 >From 9c69d6584d6b71554aec55f0de52abb4baa9435f Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 2 Oct 2024 02:13:51 +0300 Subject: [PATCH] [Clang] omit parentheses in fold expressions with a single expa

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-02 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/110761 >From 9c69d6584d6b71554aec55f0de52abb4baa9435f Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 2 Oct 2024 02:13:51 +0300 Subject: [PATCH] [Clang] omit parentheses in fold expressions with a single expa

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

2024-10-02 Thread Tom Eccles via cfe-commits
tblah wrote: I don't think it is correct to say that the option was ignored. It may still be read by the compiler driver (which generates the link line). In fact it probably *should* be processed by the compiler driver in order to set the C++ standard library correctly - otherwise you could ju

[clang] [Clang] Emit a diagnostic note at the class declaration when the method definition does not match any declaration. (PR #110638)

2024-10-02 Thread Vlad Serebrennikov via cfe-commits
@@ -102,12 +102,13 @@ namespace MultilevelSpecialization { // default argument -- how far back do we look when determining whether a // parameter was expanded from a pack? // -- zygoloid 2020-06-02 - template struct B { + template struct B { // #defined-here temp

[clang] [Clang] Emit a diagnostic note at the class declaration when the method definition does not match any declaration. (PR #110638)

2024-10-02 Thread Vlad Serebrennikov via cfe-commits
@@ -758,16 +759,18 @@ namespace cwg347 { // cwg347: yes void g(); }; - struct derived : base {}; + struct derived : base {}; // #defined-here-derived struct derived::nested {}; // expected-error@-1 {{no struct named 'nested' in 'cwg347::derived'}} int derive

[clang] [Clang] Emit a diagnostic note at the class declaration when the method definition does not match any declaration. (PR #110638)

2024-10-02 Thread Vlad Serebrennikov via cfe-commits
@@ -1009,18 +1012,20 @@ namespace cwg355 { struct ::cwg355_S s; } // cwg356: na namespace cwg357 { // cwg357: yes - template struct A { + template struct A { // #defined-here-cwg357-A void f() const; // #cwg357-f }; template void A::f() {} // expected-error@-1

[clang] [Clang] Emit a diagnostic note at the class declaration when the method definition does not match any declaration. (PR #110638)

2024-10-02 Thread Vlad Serebrennikov via cfe-commits
@@ -597,9 +597,10 @@ namespace cwg336 { // cwg336: yes void mf2(); }; }; -template<> template class A::B {}; +template<> template class A::B {}; // #defined-here-cwg336 Endilll wrote: ```suggestion template<> template class A::B {

[clang] [Clang] Emit a diagnostic note at the class declaration when the method definition does not match any declaration. (PR #110638)

2024-10-02 Thread Vlad Serebrennikov via cfe-commits
@@ -597,9 +597,10 @@ namespace cwg336 { // cwg336: yes void mf2(); }; }; -template<> template class A::B {}; +template<> template class A::B {}; // #defined-here-cwg336 template<> template<> template void A::B::mf1(T t) {} // expected-error@-

[clang] [Clang] Emit a diagnostic note at the class declaration when the method definition does not match any declaration. (PR #110638)

2024-10-02 Thread Vlad Serebrennikov via cfe-commits
@@ -758,16 +759,18 @@ namespace cwg347 { // cwg347: yes void g(); }; - struct derived : base {}; + struct derived : base {}; // #defined-here-derived Endilll wrote: ```suggestion struct derived : base {}; // #cwg347-derived ``` https://github.com/l

[clang] [Clang] Emit a diagnostic note at the class declaration when the method definition does not match any declaration. (PR #110638)

2024-10-02 Thread Vlad Serebrennikov via cfe-commits
@@ -1009,18 +1012,20 @@ namespace cwg355 { struct ::cwg355_S s; } // cwg356: na namespace cwg357 { // cwg357: yes - template struct A { + template struct A { // #defined-here-cwg357-A void f() const; // #cwg357-f }; template void A::f() {} // expected-error@-1

[clang] [Clang] Emit a diagnostic note at the class declaration when the method definition does not match any declaration. (PR #110638)

2024-10-02 Thread Vlad Serebrennikov via cfe-commits
@@ -102,12 +102,13 @@ namespace MultilevelSpecialization { // default argument -- how far back do we look when determining whether a // parameter was expanded from a pack? // -- zygoloid 2020-06-02 - template struct B { + template struct B { // #defined-here -

[clang] [Clang] Emit a diagnostic note at the class declaration when the method definition does not match any declaration. (PR #110638)

2024-10-02 Thread Vlad Serebrennikov via cfe-commits
@@ -1009,18 +1012,20 @@ namespace cwg355 { struct ::cwg355_S s; } // cwg356: na namespace cwg357 { // cwg357: yes - template struct A { + template struct A { // #defined-here-cwg357-A void f() const; // #cwg357-f }; template void A::f() {} // expected-error@-1

[clang] [Clang] Emit a diagnostic note at the class declaration when the method definition does not match any declaration. (PR #110638)

2024-10-02 Thread Vlad Serebrennikov via cfe-commits
@@ -758,16 +759,18 @@ namespace cwg347 { // cwg347: yes void g(); }; - struct derived : base {}; + struct derived : base {}; // #defined-here-derived struct derived::nested {}; // expected-error@-1 {{no struct named 'nested' in 'cwg347::derived'}} int derive

[clang] [Clang] Emit a diagnostic note at the class declaration when the method definition does not match any declaration. (PR #110638)

2024-10-02 Thread Vlad Serebrennikov via cfe-commits
@@ -1009,18 +1012,20 @@ namespace cwg355 { struct ::cwg355_S s; } // cwg356: na namespace cwg357 { // cwg357: yes - template struct A { + template struct A { // #defined-here-cwg357-A void f() const; // #cwg357-f }; template void A::f() {} // expected-error@-1

[clang] [Clang] Emit a diagnostic note at the class declaration when the method definition does not match any declaration. (PR #110638)

2024-10-02 Thread Vlad Serebrennikov via cfe-commits
@@ -1009,18 +1012,20 @@ namespace cwg355 { struct ::cwg355_S s; } // cwg356: na namespace cwg357 { // cwg357: yes - template struct A { + template struct A { // #defined-here-cwg357-A Endilll wrote: ```suggestion template struct A { // #cwg357-A ``` http

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

2024-10-02 Thread Tom Eccles via cfe-commits
@@ -0,0 +1,48 @@ +// REQUIRES: system-linux tblah wrote: I'm not sure about this test. Usually we would go about testing something like this by running FileCheck on the output of `flang-new -###` to see what is passed to the linker (and that the linker gets cal

[clang] [clang][Itanium Mangle] Enable mangling of enclosing class for member… (PR #110503)

2024-10-02 Thread Viktoriia Bakalova via cfe-commits
https://github.com/VitaNuo updated https://github.com/llvm/llvm-project/pull/110503 >From 27c2b3d4d2d9b54ed635a6b00dbb545241b498e8 Mon Sep 17 00:00:00 2001 From: Viktoriia Bakalova Date: Mon, 30 Sep 2024 12:50:09 + Subject: [PATCH] [clang][Itanium Mangle] Enable mangling of enclosing class

[clang] [clang][Itanium Mangle] Enable mangling of enclosing class for member… (PR #110503)

2024-10-02 Thread Viktoriia Bakalova via cfe-commits
@@ -693,7 +693,7 @@ ItaniumMangleContextImpl::getEffectiveDeclContext(const Decl *D) { if (VD->isExternC()) return getASTContext().getTranslationUnitDecl(); - if (const auto *FD = D->getAsFunction()) { + if (const auto *FD = dyn_cast(D)) { VitaNuo

[clang] [lldb] [clang][RecordLayoutBuilder] Be stricter about inferring packed-ness in ExternalLayouts (PR #97443)

2024-10-02 Thread Pavel Labath via cfe-commits
labath wrote: > Skipping empty fields does seem like a better heuristic here FWIW, I (independently) came to the same conclusion when investigating the fallout of #76756, though it's not fully clear to me whether the PR has been updated to do that. https://github.com/llvm/llvm-project/pull/9

[clang] [clang][x86] Add constexpr support for ADC/SBB + ADX intrinsics (PR #110668)

2024-10-02 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @phoebewang Are you OK with this? https://github.com/llvm/llvm-project/pull/110668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DebugInfo] Revert to printing canonical typenames for template aliases (PR #110767)

2024-10-02 Thread Michael Buch via cfe-commits
Michael137 wrote: Test failures in `Sema/aarch64-sve-vector-trig-ops.c` unrelated https://github.com/llvm/llvm-project/pull/110767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-10-02 Thread Greg Roth via cfe-commits
https://github.com/pow2clk approved this pull request. Looks good to me. I just have a couple nits that you might include if you create another commit for another reason. https://github.com/llvm/llvm-project/pull/109180 ___ cfe-commits mailing list c

[clang] [llvm] UEFI backend for x86_64 (PR #109320)

2024-10-02 Thread via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/109320 >From 6fc7aceab6bc193616fe78e21b796efb4dbffb58 Mon Sep 17 00:00:00 2001 From: prabhukr Date: Tue, 3 Sep 2024 21:02:15 -0700 Subject: [PATCH] UEFI backend for x86_64 --- clang/lib/Basic/Targets/OSTargets.h

[clang] [llvm] UEFI backend for x86_64 (PR #109320)

2024-10-02 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 d1335fb86466221b0499db5fc8f158f1f64d9542 6fc7aceab6bc193616fe78e21b796efb4dbffb58 --e

[clang] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-10-02 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,187 @@ +//===-- amdgpuintrin.h - AMDPGU intrinsic functions ---===// +// +// 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] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-10-02 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,187 @@ +//===-- amdgpuintrin.h - AMDPGU intrinsic functions ---===// +// +// 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] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-10-02 Thread Doug Wyatt via cfe-commits
dougsonos wrote: Thank you @Sirraide @erichkeane and all, for your patient, careful and thorough reviews! https://github.com/llvm/llvm-project/pull/99656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [llvm] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2024-10-02 Thread Reid Kleckner via cfe-commits
rnk wrote: > Perhaps a worthwhile direction is separating DISubprograms into abstract and > definition portions, much like DWARF does, which would allow us to put these > types into the declaration and have a well defined scope hierarchy: types > that get uniqued refer to the abstract-DISubpro

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-10-02 Thread Joshua Batista via cfe-commits
@@ -74,6 +75,42 @@ static Value *expandAbs(CallInst *Orig) { "dx.max"); } +static Value *expandCrossIntrinsic(CallInst *Orig) { + + VectorType *VT = cast(Orig->getType()); + if (cast(VT)->getNumElements() != 3) +report_fatal_error(Twine("

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-10-02 Thread Damyan Pepper via cfe-commits
@@ -74,6 +75,42 @@ static Value *expandAbs(CallInst *Orig) { "dx.max"); } +static Value *expandCrossIntrinsic(CallInst *Orig) { + + VectorType *VT = cast(Orig->getType()); + if (cast(VT)->getNumElements() != 3) +report_fatal_error(Twine("

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-02 Thread Lei Wang via cfe-commits
https://github.com/wlei-llvm updated https://github.com/llvm/llvm-project/pull/109837 >From 07a2cab3fa5df2965f9f7da9ee2d3603581a47f1 Mon Sep 17 00:00:00 2001 From: wlei Date: Sun, 22 Sep 2024 20:23:20 -0700 Subject: [PATCH 1/3] [InstrPGO] Instrument sampling profile based cold function --- c

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-10-02 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM. I assume you need someone to push it? https://github.com/llvm/llvm-project/pull/108942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [llvm] [PowerPC][ISelLowering] Support -mstack-protector-guard=tls (PR #110928)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-powerpc @llvm/pr-subscribers-clang Author: Keith Packard (keith-packard) Changes Add support for using a thread-local variable with a specified offset for holding the stack guard canary value. This supports both 32- and 64- bit PowerPC targets.

[clang] [llvm] [PowerPC][ISelLowering] Support -mstack-protector-guard=tls (PR #110928)

2024-10-02 Thread Keith Packard via cfe-commits
https://github.com/keith-packard created https://github.com/llvm/llvm-project/pull/110928 Add support for using a thread-local variable with a specified offset for holding the stack guard canary value. This supports both 32- and 64- bit PowerPC targets. This mirrors changes from #108942 but t

[clang] [llvm] [PowerPC][ISelLowering] Support -mstack-protector-guard=tls (PR #110928)

2024-10-02 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] [flang] [llvm] [openmp] [flang][driver] rename flang-new to flang (PR #110023)

2024-10-02 Thread Andrzej Warzyński via cfe-commits
@@ -339,11 +335,11 @@ just added using your new frontend option. ## CMake Support As of [#7246](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7246) -(and soon to be released CMake 3.24.0), `cmake` can detect `flang-new` as a +(and soon to be released CMake 3.24.0), `

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-10-02 Thread Keith Packard via cfe-commits
keith-packard wrote: > LGTM. I assume you need someone to push it? Yes please! The PowerPC one is waiting in the wings :-) https://github.com/llvm/llvm-project/pull/108942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-10-02 Thread Thomas Fransham via cfe-commits
fsfod wrote: Processing just header is also much faster than a full build and I think it would only have to run on changed headers and source files for a PR. https://github.com/llvm/llvm-project/pull/109702 ___ cfe-commits mailing list cfe-commits@li

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #110188)

2024-10-02 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: As a new feature, this needs a proposal on Discourse. https://github.com/llvm/llvm-project/pull/110188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-02 Thread Lei Wang via cfe-commits
@@ -1784,6 +1784,12 @@ defm debug_info_for_profiling : BoolFOption<"debug-info-for-profiling", PosFlag, NegFlag>; +def fprofile_generate_cold_function_coverage : Flag<["-"], "fprofile-generate-cold-function-coverage">, wlei-llvm wrote: >Would -Wl,-lclang

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-02 Thread Lei Wang via cfe-commits
@@ -1119,6 +1125,18 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, // removed. MPM.addPass( PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */)); + +if (InstrumentSampleColdFuncPath.getNumOccurrences() && +

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: StructAccessBase has two possible results: it finds an lvalue that's the base, which can't be peeled apart any further, or it finds a pointer that's the base. It shouldn't be possible to confuse a pointer with a MemberExpr: a MemberExpr is an lvalue

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-02 Thread Lei Wang via cfe-commits
@@ -0,0 +1,24 @@ +; RUN: opt < %s --passes=pgo-instr-gen -instrument-cold-function-coverage -S | FileCheck --check-prefixes=COLD %s +; RUN: opt < %s --passes=pgo-instr-gen -instrument-cold-function-coverage -cold-function-coverage-max-entry-count=1 -S | FileCheck --check-pr

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-10-02 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/109180 >From 3c58861f3e8c2f1333d0b36c6f5b7ba7f3d9e187 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 18 Sep 2024 12:20:19 -0700 Subject: [PATCH 1/9] add cross hlsl function --- clang/include/clang/Basic/Bu

[clang] [llvm] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2024-10-02 Thread Duncan P . N . Exon Smith via cfe-commits
dexonsmith wrote: I remember discovering that there are effectively two kinds of DISubprogram already... one for declarations (which usually get uniqued/deduped) and another for definitions (which I believe never do... IIRC they are always "distinct"). I imagine it would be possible/good to se

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-02 Thread Ellis Hoag via cfe-commits
@@ -1119,6 +1125,18 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, // removed. MPM.addPass( PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */)); + +if (InstrumentSampleColdFuncPath.getNumOccurrences() && +

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-10-02 Thread Aaron Puchert via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -2263,6 +2265,28 @@ static bool neverReturns(const CFGBlock *B) { return false; } +void ThreadSafetyAnalyzer::checkMismat

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-10-02 Thread Aaron Puchert via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -2263,6 +2265,28 @@ static bool neverReturns(const CFGBlock *B) { return false; } +void ThreadSafetyAnalyzer::checkMismat

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-10-02 Thread Aaron Puchert via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -26,6 +26,7 @@ namespace clang { class AnalysisDeclContext; class FunctionDecl; class NamedDecl; +class Attr; --

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-10-02 Thread Aaron Puchert via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -2282,6 +2306,9 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) { const NamedDecl *D = walker.getDecl();

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: Alright I think I'm getting what you mean with skipping over the LValueToRValue cast. I'll try to put a better fix together... https://github.com/llvm/llvm-project/pull/110497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-02 Thread Snehasish Kumar via cfe-commits
@@ -1784,6 +1784,12 @@ defm debug_info_for_profiling : BoolFOption<"debug-info-for-profiling", PosFlag, NegFlag>; +def fprofile_generate_cold_function_coverage : Flag<["-"], "fprofile-generate-cold-function-coverage">, snehasish wrote: > Is it that the b

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-10-02 Thread Greg Roth via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -disable-llvm-passes -verify -verify-ignore-unexpected pow2clk wrote: Is this producing or expected to produce unexpected diagnostics? I s

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-10-02 Thread Greg Roth via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \ +// RUN: --check-prefixes=CHECK,NATIVE_HALF \ +// RUN: -DFNATTRS=n

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-10-02 Thread Greg Roth via cfe-commits
@@ -74,6 +75,42 @@ static Value *expandAbs(CallInst *Orig) { "dx.max"); } +static Value *expandCrossIntrinsic(CallInst *Orig) { + + VectorType *VT = cast(Orig->getType()); + if (cast(VT)->getNumElements() != 3) +report_fatal_error(Twine("

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-10-02 Thread Greg Roth via cfe-commits
https://github.com/pow2clk edited https://github.com/llvm/llvm-project/pull/109180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >