[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/106657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-03 Thread Cooper Partin via cfe-commits
@@ -1545,6 +1605,30 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { break; } case Builtin::BI__builtin_hlsl_elementwise_saturate: coopp wrote: Did you mean for 'Builtin::BI__builtin_hlsl_elementwise_saturate' to fal

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-03 Thread Sarah Spall via cfe-commits
@@ -1545,6 +1605,30 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { break; } case Builtin::BI__builtin_hlsl_elementwise_saturate: spall wrote: No I did not; It is supposed to fall through to the next case, so I will

[clang] [llvm] Introduce -defer-thinlto-prelink-coro-split that skips Coro passes in ThinLTO pre-link pipeline (PR #107153)

2024-09-03 Thread Mircea Trofin via cfe-commits
mtrofin wrote: What's the scenario in which we do ThinLTO prelink and then go to codegen (i.e. skip thinlto post-link)? https://github.com/llvm/llvm-project/pull/107153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clangd-ubuntu-tsan` running on `clangd-ubuntu-clang` while building `clang` at step 6 "test-build-clangd-clangd-index-server-clangd-indexer-check-clangd". Full details are available at: https://lab.llvm.org/buildbot/#/builder

[clang] [MS] Put dllexported inline global initializers in a comdat (PR #107154)

2024-09-03 Thread Reid Kleckner via cfe-commits
https://github.com/rnk created https://github.com/llvm/llvm-project/pull/107154 Follow-up to c19f4f8069722f6804086d4438a0254104242c46 to handle corner case of exported inline variables. Should fix #56485 >From cfb2cea5a4d4e0c1712e038692c4c5acee6b1f27 Mon Sep 17 00:00:00 2001 From: Reid Kleckne

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running on `hip-vega20-0` while building `clang` at step 3 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/4830 Here is the relevant piece of the build log for

[clang] [MS] Put dllexported inline global initializers in a comdat (PR #107154)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Reid Kleckner (rnk) Changes Follow-up to c19f4f8069722f6804086d4438a0254104242c46 to handle corner case of exported inline variables. Should fix #56485 --- Full diff: https://github.com/llvm/llvm-project/pull/107154.diff 2 Files Affect

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-03 Thread Sarah Spall via cfe-commits
@@ -18695,6 +18695,50 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: { CGM.getHLSLRuntime().getSaturateIntrinsic(), ArrayRef{Op0}, nullptr, "hlsl.saturate"); } + case Builtin::BI__builtin_hlsl_select: { +Value *OpCond = EmitScalarExpr(E->getArg(0));

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-03 Thread Cooper Partin via cfe-commits
@@ -18695,6 +18695,50 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: { CGM.getHLSLRuntime().getSaturateIntrinsic(), ArrayRef{Op0}, nullptr, "hlsl.saturate"); } + case Builtin::BI__builtin_hlsl_select: { +Value *OpCond = EmitScalarExpr(E->getArg(0));

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-03 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -1545,6 +1605,30 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { break; } case Builtin::BI__builtin_hlsl_elementwise_saturate: + case Builtin::BI__builtin_hlsl_select: { bharadwajy wrote: This addition splits th

[clang] b2dabd2 - [Sema] Fix warnings

2024-09-03 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-09-03T14:31:11-07:00 New Revision: b2dabd2b06cb0ca5ea534bafe33c5cff5521be18 URL: https://github.com/llvm/llvm-project/commit/b2dabd2b06cb0ca5ea534bafe33c5cff5521be18 DIFF: https://github.com/llvm/llvm-project/commit/b2dabd2b06cb0ca5ea534bafe33c5cff5521be18.diff L

[clang] [llvm] Introduce -defer-thinlto-prelink-coro-split that skips Coro passes in ThinLTO pre-link pipeline (PR #107153)

2024-09-03 Thread Wei Wang via cfe-commits
apolloww wrote: > What's the scenario in which we do ThinLTO prelink and then go to codegen > (i.e. skip thinlto post-link)? In #104525, one use case is that pre-link output was used directly by `llc`. I think it's hard to control where it's going to be used due to this is a split phase workf

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-03 Thread Nikolas Klauser via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { philnik777 wrote: Would it make sense to split this into (1) a diagnostic abou

[clang] Adjust modulemap to mark mm3dnow as textual header. (PR #107155)

2024-09-03 Thread James Y Knight via cfe-commits
https://github.com/jyknight created https://github.com/llvm/llvm-project/pull/107155 This avoids issuing the deprecation diagnostic when building the module. Not building it into a module shouldn't cause any negative impacts, since it no longer has any declarations other than the header guard.

[clang] Adjust modulemap to mark mm3dnow as textual header. (PR #107155)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: James Y Knight (jyknight) Changes This avoids issuing the deprecation diagnostic when building the module. Not building it into a module shouldn't cause any negative impacts, since it no longer has any declarations other than the he

[clang] Adjust modulemap to mark mm3dnow as textual header. (PR #107155)

2024-09-03 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: Does anything rely on the header guard? It would be good if we could remove it since textual headers are not generally expected to declare anything, even macros. https://github.com/llvm/llvm-project/pull/107155 ___ cfe-commit

[clang] [Clang][CodeGen] Fix type for atomic float incdec operators (PR #107075)

2024-09-03 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/107075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-09-03 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: I've fixed the warnings from this PR with b2dabd2b06cb0ca5ea534bafe33c5cff5521be18. Now, I'm not familiar with the code here, but is it still important to do the consistency check on these two variables if you don't use them in `DiagnoseHLSLRegisterAttribute` at all othe

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-03 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/107129 >From 3e0cd3c450eb4aa28742c4879733987e9e2692e7 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Wed, 28 Aug 2024 01:44:35 + Subject: [PATCH 1/4] implement select intrinsic --- clang/include/clang/Basic/Built

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-03 Thread Cooper Partin via cfe-commits
@@ -1545,6 +1605,30 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { break; } case Builtin::BI__builtin_hlsl_elementwise_saturate: coopp wrote: Sounds good. https://github.com/llvm/llvm-project/pull/107129 _

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-03 Thread Chris B via cfe-commits
@@ -290,8 +290,6 @@ struct BuiltinTypeDeclBuilder { SourceLocation())); MethodDecl->setLexicalDeclContext(Record); MethodDecl->setAccess(AccessSpecifier::AS_public); -MethodDecl->addAttr(AlwaysInlineAttr::CreateImplicit(

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

2024-09-03 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 1/9] clang/csa: add initial support for builtin overflow --- ..

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

2024-09-03 Thread Pavel Skripkin via cfe-commits
@@ -50,6 +118,75 @@ class BuiltinFunctionChecker : public Checker { } // namespace +std::pair +BuiltinFunctionChecker::checkOverflow(CheckerContext &C, SVal RetVal, + QualType Res) const { + ProgramStateRef State = C.getState(); + SValBu

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-03 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/107129 >From 3e0cd3c450eb4aa28742c4879733987e9e2692e7 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Wed, 28 Aug 2024 01:44:35 + Subject: [PATCH 1/5] implement select intrinsic --- clang/include/clang/Basic/Built

[clang] [MS] Put dllexported inline global initializers in a comdat (PR #107154)

2024-09-03 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: What's the interaction here with the standard's ordering guarantees? The comment in the code indicates that we can't make a separate comdat for ordered initialization... but inline variables do require partial ordering. Please update the comment as appropriate. https://

[clang] [libclc] [llvm] [libclc] More cross compilation fixes (PR #97811)

2024-09-03 Thread Harald van Dijk via cfe-commits
hvdijk wrote: Both buildbot failures appear to be unrelated to this PR: neither fails in libclc, the first has resolved itself and passes in later attempts, the second looks like the builder has just run out of disk space. If I am wrong and there is something I should look into please let me k

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-03 Thread Dmitry Polukhin via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Kyungwoo Lee Message-ID: In-Reply-To: dmpolukhin wrote: > Got it. I am pretty interested use case for modules. And from your commit > history, it looks like you prefer header units than named modules? Yes, we prefer header units for the time being

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-03 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. This looks good to me. https://github.com/llvm/llvm-project/pull/107129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CGOpenMPRuntime] Use DenseMap::operator[] (NFC) (PR #107158)

2024-09-03 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/107158 I'm planning to deprecate DenseMap::FindAndConstruct in favor of DenseMap::operator[]. >From e64e76f869af9d37625979dca68e1ee4f76b5bbc Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 3 Sep 2024 15:

[clang] [CGOpenMPRuntime] Use DenseMap::operator[] (NFC) (PR #107158)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes I'm planning to deprecate DenseMap::FindAndConstruct in favor of DenseMap::operator[]. --- Full diff: https://github.com/llvm/llvm-project/pull/107158.diff 1 Files Affected: - (modified) clang/lib/C

[clang] [CGOpenMPRuntime] Use DenseMap::operator[] (NFC) (PR #107158)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Kazu Hirata (kazutakahirata) Changes I'm planning to deprecate DenseMap::FindAndConstruct in favor of DenseMap::operator[]. --- Full diff: https://github.com/llvm/llvm-project/pull/107158.diff 1 Files Affected: - (modified) cla

[clang] [CGOpenMPRuntime] Use DenseMap::operator[] (NFC) (PR #107158)

2024-09-03 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/107158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][C23] Support N3029 Improved Normal Enumerations (PR #103917)

2024-09-03 Thread Eli Friedman via cfe-commits
@@ -19553,17 +19555,18 @@ EnumConstantDecl *Sema::CheckEnumConstant(EnumDecl *Enum, // If we're not in C++, diagnose the overflow of enumerator values, // which in C99 means that the enumerator value is not representable in -// an int (C99 6.7.2.2p2).

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/107160 Fixes #104861 >From 337a9ed1d5e7c71fb5be5741afe7726f5b76af7b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 3 Sep 2024 15:30:50 -0700 Subject: [PATCH] [HLSL] Apply resource attributes to the resource ty

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-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 18cf14efe3e82b2343817fd174bcac48244c8f50 337a9ed1d5e7c71fb5be5741afe7726f5b76af7b --e

[clang] [flang] Allow disabling of types from the command line (PR #107126)

2024-09-03 Thread Renaud Kauffmann via cfe-commits
https://github.com/Renaud-K updated https://github.com/llvm/llvm-project/pull/107126 >From 8a1c51bdd290fc47cac359646aeb01623574231f Mon Sep 17 00:00:00 2001 From: Renaud-K Date: Tue, 3 Sep 2024 09:34:09 -0700 Subject: [PATCH 1/3] Allow disabling of types from the command line --- clang/includ

[clang] [clang, hexagon] Update copyright, license text (PR #107161)

2024-09-03 Thread Brian Cain via cfe-commits
https://github.com/androm3da created https://github.com/llvm/llvm-project/pull/107161 When this file was first contributed - `28b01c59c93d ([hexagon] Add {hvx,}hexagon_{protos,circ_brev...}, 2021-06-30)` - I incorrectly included a QuIC copyright statement with "All rights reserved". I should

[clang] [clang, hexagon] Update copyright, license text (PR #107161)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Brian Cain (androm3da) Changes When this file was first contributed - `28b01c59c93d ([hexagon] Add {hvx,}hexagon_{protos,circ_brev...}, 2021-06-30)` - I incorrectly included a QuIC copyright statement with "All rights reserved". I

[clang] [clang, hexagon] Update copyright, license text (PR #107161)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brian Cain (androm3da) Changes When this file was first contributed - `28b01c59c93d ([hexagon] Add {hvx,}hexagon_{protos,circ_brev...}, 2021-06-30)` - I incorrectly included a QuIC copyright statement with "All rights reserved". I should

[clang] [clang, hexagon] Update copyright, license text (PR #107161)

2024-09-03 Thread Brian Cain via cfe-commits
androm3da wrote: Note that this was the only source file from the original commit without the correct header. https://github.com/llvm/llvm-project/pull/107161 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-03 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,76 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \ +// RUN: -o - | FileCheck %s --check-prefixes=CHECK + +// CHECK: %hlsl.select = select i1 +// CHECK: ret i32 %hlsl.selec

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-03 Thread Damyan Pepper via cfe-commits
@@ -1544,6 +1604,30 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { return true; break; } + case Builtin::BI__builtin_hlsl_select: { damyanp wrote: This implementation has quite a different shape to the other b

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-03 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,90 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected + +int test_no_arg() { + return select(); + // expected-error@-1 {{no matching function for call to 's

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-03 Thread Damyan Pepper via cfe-commits
@@ -1544,6 +1604,30 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { return true; break; } + case Builtin::BI__builtin_hlsl_select: { +if (SemaRef.checkArgCount(TheCall, 3)) + return true; +QualType ArgTy = TheCall->

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-03 Thread Damyan Pepper via cfe-commits
@@ -1512,6 +1512,66 @@ void SetElementTypeAsReturnType(Sema *S, CallExpr *TheCall, TheCall->setType(ReturnType); } +bool CheckBoolSelect(Sema *S, CallExpr *TheCall) { damyanp wrote: nit: it'd be good for these helpers that are only used from this cpp file

[clang] [MS] Put dllexported inline global initializers in a comdat (PR #107154)

2024-09-03 Thread Reid Kleckner via cfe-commits
rnk wrote: I think there is no change here in our conformance on inline variable initialization order, except that non-discardable inline variables (achieved in this instance with dllexport, but perhaps there are other ways to do this. The classic case is explicit instantiation, which is unord

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-09-03 Thread Chris Apple via cfe-commits
cjappl wrote: Just saw the test failure, but it is unrelated: ``` _bk;t=1725300551284FAIL: lld :: ELF/avr-reloc.s (84796 of 87084) _bk;t=1725300551284 TEST 'lld :: ELF/avr-reloc.s' FAILED ``` https://github.com/llvm/llvm-project/pull/106736 ___

[clang] [MS] Put dllexported inline global initializers in a comdat (PR #107154)

2024-09-03 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: If there isn't a way to emit conforming code, then I think it's fine to emit non-conforming code, as long as there's an appropriate comment. Breaking the ABI is clearly worse. Does this impact non-MS targets? https://github.com/llvm/llvm-project/pull/107154 _

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/107160 >From 337a9ed1d5e7c71fb5be5741afe7726f5b76af7b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 3 Sep 2024 15:30:50 -0700 Subject: [PATCH 1/2] [HLSL] Apply resource attributes to the resource type rather t

[clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2024-09-03 Thread Daniil Fukalov via cfe-commits
https://github.com/dfukalov updated https://github.com/llvm/llvm-project/pull/106810 >From 0221e97459534f0f7396e7970663e1a4f1f98cca Mon Sep 17 00:00:00 2001 From: dfukalov Date: Sat, 31 Aug 2024 01:45:27 +0200 Subject: [PATCH 1/2] [NFC] Add explicit #include llvm-config.h where its macros are

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104544 >From 6d5f8991a4ef9e79bc1bed30addf7b29b7ed0d2e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 15 Aug 2024 19:03:29 -0700 Subject: [PATCH 01/12] Implement `__builtin_is_intangible` --- clang/include/clan

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104544 >From 6d5f8991a4ef9e79bc1bed30addf7b29b7ed0d2e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 15 Aug 2024 19:03:29 -0700 Subject: [PATCH 01/12] Implement `__builtin_is_intangible` --- clang/include/clan

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

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

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-09-03 Thread via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/76838 >From 7cc2e01a4a272934861e0d36791985e9604d9794 Mon Sep 17 00:00:00 2001 From: prabhukr Date: Mon, 4 Dec 2023 08:54:14 -0800 Subject: [PATCH] [UEFI] X86_64 UEFI Clang Driver Introduce changes necessary for UEFI X

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-09-03 Thread via cfe-commits
@@ -819,6 +819,43 @@ class LLVM_LIBRARY_VISIBILITY X86_64TargetInfo : public X86TargetInfo { } }; +// x86-64 UEFI target +class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo +: public UEFITargetInfo { +public: + UEFIX86_64TargetInfo(const llvm::Triple &Triple, const Tar

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-03 Thread Jonathan Wakely via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { jwakely wrote: > I think they absolutely should, but those names are not porta

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-09-03 Thread via cfe-commits
@@ -0,0 +1,92 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// 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: Apache-2.0

[clang] [compiler-rt] [libcxx] [lldb] [llvm] Rename Sanitizer Coverage => Coverage Sanitizer (PR #106505)

2024-09-03 Thread Med Ismail Bennani via cfe-commits
https://github.com/medismailben approved this pull request. LGTM for lldb's part https://github.com/llvm/llvm-project/pull/106505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-09-03 Thread via cfe-commits
@@ -0,0 +1,92 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// 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: Apache-2.0

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-03 Thread Jonathan Wakely via cfe-commits
https://github.com/jwakely edited https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-09-03 Thread via cfe-commits
@@ -0,0 +1,92 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// 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: Apache-2.0

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-09-03 Thread via cfe-commits
Prabhuk wrote: > Some older toolchains were probably contributed with a lot of > `CmdArgs.push_back` uncovered by tests. They are not good examples to follow. > For new toolchains, we do want all constructed `CmdArgs.push_back` to be > covered. This allows refactoring by someone who is unfamil

[clang] [MS] Put dllexported inline global initializers in a comdat (PR #107154)

2024-09-03 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/107154 >From cfb2cea5a4d4e0c1712e038692c4c5acee6b1f27 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 3 Sep 2024 21:16:40 + Subject: [PATCH 1/2] [MS] Put dllexported inline global initializers in a comdat Foll

[clang] [MS] Put dllexported inline global initializers in a comdat (PR #107154)

2024-09-03 Thread Reid Kleckner via cfe-commits
rnk wrote: Yeah, I should've explicitly said I was working on updating the comment block. It needed significant surgery. Actually, this code could probably use more significant refactoring, but let's set that aside for now. > Does this impact non-MS targets? At the moment, I can't think of a

[clang] [MS] Put dllexported inline global initializers in a comdat (PR #107154)

2024-09-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 24b6b82487f15dd9d6cbe8a716dd13a6808a2528 3cb368a8c01f99a7b12ece55e5b2145650d4f89d --e

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/107160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/107160 >From 337a9ed1d5e7c71fb5be5741afe7726f5b76af7b Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 3 Sep 2024 15:30:50 -0700 Subject: [PATCH 1/3] [HLSL] Apply resource attributes to the resource type rather t

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/107160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Helena Kotas (hekota) Changes Converts existing resource attributes `[[hlsl::resource_class(..)]]` and `[[is_rov]]` to from declaration attributes to type attributes. During type attribute processing all HLSL resource type attrib

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Helena Kotas (hekota) Changes Converts existing resource attributes `[[hlsl::resource_class(..)]]` and `[[is_rov]]` to from declaration attributes to type attributes. During type attribute processing all HLSL resource type attributes are

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Helena Kotas (hekota) Changes Converts existing resource attributes `[[hlsl::resource_class(..)]]` and `[[is_rov]]` to from declaration attributes to type attributes. During type attribute processing all HLSL resource type attributes are

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/107160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MS] Put dllexported inline global initializers in a comdat (PR #107154)

2024-09-03 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/107154 >From cfb2cea5a4d4e0c1712e038692c4c5acee6b1f27 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 3 Sep 2024 21:16:40 + Subject: [PATCH 1/3] [MS] Put dllexported inline global initializers in a comdat Foll

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2024-09-03 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/107168 None >From fb028015b8f86f87b6d1643e91c21531c768a198 Mon Sep 17 00:00:00 2001 From: yronglin Date: Sat, 17 Aug 2024 16:54:26 +0800 Subject: [PATCH 1/2] [Clang] Add peekNextPPToken, makes peek next token withou

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2024-09-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 448d8fa880be5cae0f63c3b248f07f647013a5a4 b7b4e2549a5fb723b455768f2bcf75bfab6cab04 --e

[clang] eaa95a1 - [clang] Add test for CWG2486 (`noexcept` and function pointer conversion) (#107131)

2024-09-03 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-09-04T04:10:46+04:00 New Revision: eaa95a1c2bd38332c1a4e634595f29d22b28ffea URL: https://github.com/llvm/llvm-project/commit/eaa95a1c2bd38332c1a4e634595f29d22b28ffea DIFF: https://github.com/llvm/llvm-project/commit/eaa95a1c2bd38332c1a4e634595f29d22b28ffea.

[clang] [clang] Add test for CWG2486 (`noexcept` and function pointer conversion) (PR #107131)

2024-09-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/107131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

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

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread Damyan Pepper via cfe-commits
@@ -77,6 +77,23 @@ class SemaHLSL : public SemaBase { ExprResult ActOnOutParamExpr(ParmVarDecl *Param, Expr *Arg); QualType getInoutParameterType(QualType Ty); + + // FIXME: This can be hidden (as static function in SemaHLSL.cpp) once we no + // longer need to create bui

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp commented: Typo in description: > Converts existing resource attributes [[hlsl::resource_class(..)]] and > [[is_rov]] ~~to~~ from declaration attributes to type attributes. There's many places in the existing tests where these attributes are being used in ways we d

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread Damyan Pepper via cfe-commits
@@ -1,32 +1,32 @@ // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s - -// CHECK: -HLSLResourceClassAttr 0x{{[0-9a-f]+}} SRV -struct Eg1 { - [[hlsl::resource_class(SRV)]] int i; +// CHECK: CXXRecordDecl 0x{{[0-9a-f]+}} {{.*}}

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread Damyan Pepper via cfe-commits
@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { - if (!AL.isArgIdent(0)) { -Diag(AL.getLoc(), diag::err_attribute_argument_type) -

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread Damyan Pepper via cfe-commits
@@ -1,32 +1,32 @@ // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s - -// CHECK: -HLSLResourceClassAttr 0x{{[0-9a-f]+}} SRV -struct Eg1 { - [[hlsl::resource_class(SRV)]] int i; +// CHECK: CXXRecordDecl 0x{{[0-9a-f]+}} {{.*}}

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-09-03 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf closed https://github.com/llvm/llvm-project/pull/101603 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-09-03 Thread Freddy Ye via cfe-commits
@@ -153,7 +163,8 @@ const X86InstrFMA3Group *llvm::getFMA3Group(unsigned Opcode, uint64_t TSFlags) { ((TSFlags & X86II::EncodingMask) == X86II::EVEX && ((TSFlags & X86II::OpMapMask) == X86II::T8 || (TSF

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-09-03 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. (@zyn0217 I'm going to mark this as "Request changes" to reflect my understanding from the previous comment that the next step here is you splitting up the patch. If I've misunderstood and you'd like me to have a look at

[clang] [flang] Allow disabling of types from the command line (PR #107126)

2024-09-03 Thread Renaud Kauffmann via cfe-commits
https://github.com/Renaud-K updated https://github.com/llvm/llvm-project/pull/107126 >From 8a1c51bdd290fc47cac359646aeb01623574231f Mon Sep 17 00:00:00 2001 From: Renaud-K Date: Tue, 3 Sep 2024 09:34:09 -0700 Subject: [PATCH 1/4] Allow disabling of types from the command line --- clang/includ

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-09-03 Thread Chris B via cfe-commits
@@ -1115,13 +1115,13 @@ void ASTWriter::WriteBlockInfoBlock() { } /// Prepares a path for being written to an AST file by converting it -/// to an absolute path and removing nested './'s. +/// to an absolute path and removing nested './'s and '../'s. /// /// \return \c true

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-09-03 Thread Chris B via cfe-commits
@@ -4772,6 +4772,23 @@ bool ASTWriter::PreparePathForOutput(SmallVectorImpl &Path) { Changed = true; } + // If we are generating a normal PCH (EG. not a C++ module). + if (!WritingModule) { +// Use the vfs overlay if it exists to translate paths. +auto &FileSy

[clang] [Clang] Treat default template argument as constant expressions (PR #107073)

2024-09-03 Thread Shafik Yaghmour via cfe-commits
@@ -97,3 +97,29 @@ void foo() { } #endif + +#if __cplusplus >= 202002L +void GH107048() { + constexpr int x{}; + const int y{}; + auto b = []{}; + using A = decltype([]{}); + + int z; // expected-note {{'z' declared here}} + auto c = []{ +// expected-error@-1 {{no ma

[clang-tools-extra] Update clang tidy Contributing guide (PR #106672)

2024-09-03 Thread via cfe-commits
MichelleCDjunaidi wrote: Will open the issue soon (since mobile Github is accessible), but the additional new PR will be in a few days (no access to laptop currently) https://github.com/llvm/llvm-project/pull/106672 ___ cfe-commits mailing list cfe-co

[clang-tools-extra] [clangd] Support outgoing calls in call hierarchy (PR #77556)

2024-09-03 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: @kadircet perhaps you might be able to pick up this review? Or, barring of a full review, your opinion on the directional question in [this comment](https://reviews.llvm.org/D93829#4654786) would be appreciated as well: > how would you feel about proceeding with the patch

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-03 Thread Craig Topper via cfe-commits
topperc wrote: @JinjinLi868 are you still working on this? https://github.com/llvm/llvm-project/pull/89051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Apply resource attributes to the resource type rather than the handle member (PR #107160)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/107160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 99f02a8 - [clang] Add tests for CWG issues about language linkage (#107019)

2024-09-03 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-09-04T05:35:13+04:00 New Revision: 99f02a874984f2b79c3fbd8ae6bbceb7366521ad URL: https://github.com/llvm/llvm-project/commit/99f02a874984f2b79c3fbd8ae6bbceb7366521ad DIFF: https://github.com/llvm/llvm-project/commit/99f02a874984f2b79c3fbd8ae6bbceb7366521ad.

[clang] [clang] Add tests for CWG issues about language linkage (PR #107019)

2024-09-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/107019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-03 Thread Chuanqi Xu via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Kyungwoo Lee Message-ID: In-Reply-To: ChuanqiXu9 wrote: > > Got it. I am pretty interested use case for modules. And from your commit > > history, it looks like you prefer header units than named modules? > > Yes, we prefer header units for the ti

[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)

2024-09-03 Thread via cfe-commits
h-vetinari wrote: Given the state of the discussion on discourse, I looked at this PR again, and was curious about conflicts with main. I don't think I'm the right person to propose this as a PR, but if someone wants to take my attempt as a jumping-off point, I put the branch [here](https://g

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-03 Thread Chris B via cfe-commits
@@ -0,0 +1,76 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \ +// RUN: -o - | FileCheck %s --check-prefixes=CHECK + +// CHECK: %hlsl.select = select i1 +// CHECK: ret i32 %hlsl.selec

  1   2   3   4   5   >