[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Given the libc++ experience, let's move forward with this PR as-is. If there's an issue in practice, we'll disable the tests on changes to Clang at that point. https://github.com/llvm/llvm-project/pull/94208 ___

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

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

[clang] [Clang] Add timeout for GPU detection utilities (PR #94751)

2024-06-07 Thread Artem Belevich via cfe-commits
Artem-B wrote: Ooh... I think I know exactly what may be causing this. On machines where NVIDIA GPUs are used for compute only (e.g. a headless server machine), NVIDIA drivers are not always loaded by default and may not have driver persistence enabled. The drivers get loaded when GPU is acces

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-07 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Could be. Is there a way for me to debug this? https://github.com/llvm/llvm-project/pull/89811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-07 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Perhaps we can disable this platform if we have a way to express the setup in lit. https://github.com/llvm/llvm-project/pull/89811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [Clang] Add timeout for GPU detection utilities (PR #94751)

2024-06-07 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Ooh... I think I know exactly what may be causing this. I've observed this a few times. For my case it's usually when some application hangs on the GPU and no one notices, then these tools hang forever and it takes awhile to notice. Figured an error is friendlier since I highl

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via cfe-commits
temyurchenko wrote: > I see the 2nds commit doesn't add any tests! Please make it do so I've tried and I'm not quite sure how to do it. The issue is we need to test AST printing of «implicitly declared» functions, such as builtins and functions instrumented by lldb, such as `log` for logging;

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From a54036c0fdc1a875f40a274d502dd96651a35ae3 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Thu, 6 Jun 2024 20:20:19 -0400 Subject: [PATCH] enforce the unbraced `extern ` invariant Quoting 9.11.8: >

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Erich Keane via cfe-commits
erichkeane wrote: > > I see the 2nds commit doesn't add any tests! Please make it do so > > I've tried and I'm not quite sure how to do it. The issue is we need to test > AST printing of «implicitly declared» functions, such as builtins and > functions instrumented by lldb, such as `log` for l

[clang] [llvm] [AArch64] set AppleA14 architecture version to v8.4-a (PR #92600)

2024-06-07 Thread via cfe-commits
AtariDreams wrote: Is this ready to merge? https://github.com/llvm/llvm-project/pull/92600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via cfe-commits
temyurchenko wrote: > Hmm... I don't have a great idea. Is using it not enough to get it to be > emitted? I see here we don't seem to cause them to be emitted: > https://godbolt.org/z/nYzMca7Te Yes, I get the same result. I also tried adding a test in `DeclPrinterTest`, but it doesn't lookup

[clang] c3a5087 - [Driver, test] Add -Wno-msvc-not-found to gcc-param.c

2024-06-07 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-06-07T11:45:10-07:00 New Revision: c3a50879dfca9ab06ebfe52f48019bb6ac40bb4d URL: https://github.com/llvm/llvm-project/commit/c3a50879dfca9ab06ebfe52f48019bb6ac40bb4d DIFF: https://github.com/llvm/llvm-project/commit/c3a50879dfca9ab06ebfe52f48019bb6ac40bb4d.diff

[clang] bd6e324 - [clang][driver] Enable '-flto' on bare-metal (#94738)

2024-06-07 Thread via cfe-commits
Author: walkerkd Date: 2024-06-07T19:45:33+01:00 New Revision: bd6e324b67cdadde2593327753e99782146d9bf8 URL: https://github.com/llvm/llvm-project/commit/bd6e324b67cdadde2593327753e99782146d9bf8 DIFF: https://github.com/llvm/llvm-project/commit/bd6e324b67cdadde2593327753e99782146d9bf8.diff LOG:

[clang] [clang][driver] Enable '-flto' on bare-metal (PR #94738)

2024-06-07 Thread via cfe-commits
https://github.com/walkerkd closed https://github.com/llvm/llvm-project/pull/94738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] deprecate alias, class templates without arg list after template kw (PR #94789)

2024-06-07 Thread Erick Velez via cfe-commits
https://github.com/evelez7 created https://github.com/llvm/llvm-project/pull/94789 Deprecate the use of the template keyword before the qualified name of an alias or class template without a template argument list. Introduced in [P1787](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/

[clang] [clang] deprecate alias, class templates without arg list after template kw (PR #94789)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erick Velez (evelez7) Changes Deprecate the use of the template keyword before the qualified name of an alias or class template without a template argument list. Introduced in [P1787](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/20

[clang] [Clang] Add timeout for GPU detection utilities (PR #94751)

2024-06-07 Thread Artem Belevich via cfe-commits
Artem-B wrote: > What's the config to set this by default without any graphics? https://docs.nvidia.com/deploy/driver-persistence/index.html I usually use "nvidia-smi -i -pm ENABLED" to force the driver to be loaded permanently. As for `__nvcc_device_query`, my guess is that it just uses a

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-07 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/94549 >From 36618e65d94ffa3e83464b7d19ff6cd7d5855abf Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Wed, 5 Jun 2024 16:51:51 -0700 Subject: [PATCH 1/2] [Offload][NFCI] Initialize the KernelArgsTy to default

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-07 Thread Michael Buch via cfe-commits
Michael137 wrote: > Given the libc++ experience, let's move forward with this PR as-is. If > there's an issue in practice, we'll disable the tests on changes to Clang at > that point. Do note that libc++ CI only runs a subset of the LLDB tests. Only the ones that are impacted by libc++. We co

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Durgadoss R via cfe-commits
https://github.com/durga4github updated https://github.com/llvm/llvm-project/pull/94735 >From 94b25ae304a102cc8c0196f3ca6c460dd4de7026 Mon Sep 17 00:00:00 2001 From: Durgadoss R Date: Wed, 5 Jun 2024 19:22:31 +0530 Subject: [PATCH] [APFloat] Add APFloat support for FP6 data types This patch ad

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-06-07 Thread Eli Friedman via cfe-commits
@@ -6853,6 +6853,13 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { if (ES->hasExternalDefinitions(D) == ExternalASTSource::EK_Never) DI->completeUnusedClass(*CRD); } +// If we're emitting a dynamic class from the importable module we're +// emi

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-06-07 Thread Eli Friedman via cfe-commits
@@ -3219,7 +3219,8 @@ void CodeGenModule::EmitVTablesOpportunistically() { for (const CXXRecordDecl *RD : OpportunisticVTables) { assert(getVTables().isVTableExternal(RD) && "This queue should only contain external vtables"); -if (getCXXABI().canSpeculative

[libcxx] [libcxxabi] [libunwind] [libc++] Fix deployment target Lit features (PR #94791)

2024-06-07 Thread Louis Dionne via cfe-commits
https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/94791 We were not making any distinction between e.g. the "Apple-flavored" libc++ built from trunk and the system-provided standard library on Apple platforms. For example, any test that would be XFAILed on a back-dep

[libcxx] [libcxxabi] [libunwind] [libc++] Fix deployment target Lit features (PR #94791)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: Louis Dionne (ldionne) Changes We were not making any distinction between e.g. the "Apple-flavored" libc++ built from trunk and the system-provided standard library on Apple platforms. For example, any test that would be XFAILed on a bac

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-07 Thread Eli Friedman via cfe-commits
@@ -196,12 +196,14 @@ bool AArch64FunctionInfo::needsAsyncDwarfUnwindInfo( const MachineFunction &MF) const { if (!NeedsAsyncDwarfUnwindInfo) { const Function &F = MF.getFunction(); +const AArch64FunctionInfo *AFI = MF.getInfo(); // The check got "minsize" i

[libcxx] [libcxxabi] [libunwind] [libc++] Fix deployment target Lit features (PR #94791)

2024-06-07 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 f9ae07b9e1509732be01fddefb529c6626c119a9 61a434bae9f3787122e123540b7c379f410e037b --

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Durgadoss R via cfe-commits
@@ -68,6 +68,10 @@ enum class fltNonfiniteBehavior { // `fltNanEncoding` enum. We treat all NaNs as quiet, as the available // encodings do not distinguish between signalling and quiet NaN. NanOnly, + + // This behavior is present in Float6E3M2FN and Float6E2M3FN types.

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Durgadoss R via cfe-commits
@@ -139,6 +143,10 @@ static constexpr fltSemantics semFloat8E4M3FNUZ = { static constexpr fltSemantics semFloat8E4M3B11FNUZ = { 4, -10, 4, 8, fltNonfiniteBehavior::NanOnly, fltNanEncoding::NegativeZero}; static constexpr fltSemantics semFloatTF32 = {127, -126, 11, 19}; +sta

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-07 Thread Eli Friedman via cfe-commits
@@ -214,7 +232,8 @@ declare double @za_shared_callee(double) "aarch64_inout_za" define double @za_new_caller_to_za_shared_callee(double %x) nounwind noinline optnone "aarch64_new_za"{ ; CHECK-COMMON-LABEL: za_new_caller_to_za_shared_callee: ; CHECK-COMMON: // %bb.0: //

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-07 Thread Eli Friedman via cfe-commits
@@ -196,12 +196,14 @@ bool AArch64FunctionInfo::needsAsyncDwarfUnwindInfo( const MachineFunction &MF) const { if (!NeedsAsyncDwarfUnwindInfo) { const Function &F = MF.getFunction(); +const AArch64FunctionInfo *AFI = MF.getInfo(); // The check got "minsize" i

[clang] [HLSL] Use llvm::Triple::EnvironmentType instead of HLSLShaderAttr::ShaderType (PR #93847)

2024-06-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/93847 >From dd175a247480396b9d35cb995333fcd14152e347 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 29 May 2024 18:38:45 -0700 Subject: [PATCH 1/3] [HLSL] Use llvm::Triple::EnvironmentType instead of ShaderType

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-07 Thread Björn Schäpers via cfe-commits
@@ -22858,6 +22858,31 @@ TEST_F(FormatTest, FormatsLambdas) { " //\n" "});"); + verifyFormat("int main() {\n" HazardyKnusperkeks wrote: Cache the style and re use it. https://github.com/llvm/llvm-project/pull/94560 _

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-07 Thread Björn Schäpers via cfe-commits
@@ -1457,7 +1457,7 @@ unsigned ContinuationIndenter::getNewLineColumn(const LineState &State) { !Current.isOneOf(tok::colon, tok::comment)) { return ContinuationIndent; } - if (Style.isCpp() && Current.is(tok::arrow) && + if (Style.isCpp() && Current.is(TT_Traili

[clang] [clang-format] Fix bad comment indentation before ifdef after braceless if (PR #94776)

2024-06-07 Thread Björn Schäpers via cfe-commits
@@ -796,6 +796,24 @@ TEST_F(FormatTestComments, ParsesCommentsAdjacentToPPDirectives) { format("namespace {}\n /* Test */#define A")); } + +TEST_F(FormatTestComments, DeIdentsCommentBeforeIfdefAfterBracelessIf) { + EXPECT_EQ("void f() {\n"

[clang] [clang-format] Fix bad comment indentation before ifdef after braceless if (PR #94776)

2024-06-07 Thread Björn Schäpers via cfe-commits
@@ -4736,6 +4738,7 @@ void UnwrappedLineParser::distributeComments( // the two lines about b form a maximal trail, so there are two sections, the // first one consisting of the single comment "// line about a" and the // second one consisting of the next two comments. + -

[clang] [clang-format] Fix bad comment indentation before ifdef after braceless if (PR #94776)

2024-06-07 Thread Björn Schäpers via cfe-commits
@@ -4828,7 +4834,11 @@ void UnwrappedLineParser::readToken(int LevelDifference) { PPBranchLevel > 0) { Line->Level += PPBranchLevel; } - flushComments(isOnNewLine(*FormatTok)); + + if (!UnBracedBodyDepth) { HazardyKnusperkeks

[clang] [clang-format] Fix bad comment indentation before ifdef after braceless if (PR #94776)

2024-06-07 Thread Björn Schäpers via cfe-commits
@@ -338,6 +338,9 @@ class UnwrappedLineParser { // `decltype(auto)`. bool IsDecltypeAutoFunction = false; + + int UnBracedBodyDepth = 0; HazardyKnusperkeks wrote: Could you add some documentation? https://github.com/llvm/llvm-project/pull/94776

[clang] [clang-format] Fix bad comment indentation before ifdef after braceless if (PR #94776)

2024-06-07 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 1b58940c88edaad9320bd21eaa7da65f7e791552 d5aca6de9f513ce049c337dc4c17ea32bb2721aa --

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-07 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From 9b18a5c4132cf093fc9b32f6b4dcfe406d485e3d Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Thu, 6 Jun 2024 20:20:19 -0400 Subject: [PATCH] enforce the unbraced `extern ` invariant Quoting 9.11.8: >

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Thomas Raoux via cfe-commits
https://github.com/ThomasRaoux approved this pull request. LGTM, please wait to confirm that everybody is happy with the naming before merging. @krzysz00 was your comment meant to be a blocker? https://github.com/llvm/llvm-project/pull/94735 ___ cfe-

[clang] [CodeGen] Simplify codegen for array initialization (PR #93956)

2024-06-07 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. Sure, LGTM. https://github.com/llvm/llvm-project/pull/93956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-07 Thread Philip Reames via cfe-commits
@@ -381,3 +381,20 @@ def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu", TuneZExtHFusion, TuneZExtWFusion, TuneShiftedZExtWFusion]>; + +

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-07 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/94549 >From 36618e65d94ffa3e83464b7d19ff6cd7d5855abf Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Wed, 5 Jun 2024 16:51:51 -0700 Subject: [PATCH 1/2] [Offload][NFCI] Initialize the KernelArgsTy to default

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-07 Thread Joshua Batista via cfe-commits
bob80905 wrote: Should a test be added when the return type is a different float type than the first arg type? https://github.com/llvm/llvm-project/pull/94559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-07 Thread Joshua Batista via cfe-commits
@@ -2923,6 +2923,18 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, SetSqrtFPAccuracy(Call); return RValue::get(Call); } + +case Builtin::BItan: bob80905 wrote: What is the difference between `BItanf` an

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-07 Thread Paul Kirth via cfe-commits
ilovepi wrote: > @ilovepi I minimised the failing issue from: > https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/graphics/lib/compute/spinel/ext/transform_stack/transform_stack.c > to: > > ```c++ > #include > #include > > #define SPN_TRANSFORM_STACK_TAN(x_) tanf(x_) > > floa

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-07 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/94559 >From 51247e430ad49c4729e2e3664104367b13fbad9e Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Fri, 24 May 2024 10:01:52 -0400 Subject: [PATCH 1/3] [clang] Add tanf16 builtin and support for tan constrained in

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-07 Thread Farzon Lotfi via cfe-commits
farzonl wrote: > Should a test be added when the return type is a different float type than > the first arg type? So if our function that calls the builtin has a different return type than the input that we pass in to the builtin then that will be handled by other casting code that has its o

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-07 Thread Philip Reames via cfe-commits
https://github.com/preames edited https://github.com/llvm/llvm-project/pull/94564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-07 Thread Farzon Lotfi via cfe-commits
@@ -2923,6 +2923,18 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, SetSqrtFPAccuracy(Call); return RValue::get(Call); } + +case Builtin::BItan: farzonl wrote: def TanF16F128 : Builtin, F16F128MathTempla

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-07 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/94559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-07 Thread Farzon Lotfi via cfe-commits
@@ -7881,7 +8111,7 @@ declare <3 x double> @llvm.experimental.constrained.powi.v3f64(<3 x double>, i32 declare <3 x float> @llvm.experimental.constrained.sin.v3f32(<3 x float>, metadata, metadata) declare <3 x double> @llvm.experimental.constrained.sin.v3f64(<3 x double>, met

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-07 Thread Farzon Lotfi via cfe-commits
@@ -151,6 +151,17 @@ entry: ret double %result } +; Verify that tan(42.0) isn't simplified when the rounding mode is unknown. +; CHECK-LABEL: ftan +; CHECK: call double @llvm.experimental.constrained.tan +define double @ftan() #0 { +entry: + %result = call double @llvm.expe

[clang] [Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-06-07 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/92031 >From ac5aeb5c3a134d085320fc7fc5cf3f2c8c41a1f1 Mon Sep 17 00:00:00 2001 From: ziqingluo-90 Date: Mon, 13 May 2024 13:31:21 -0700 Subject: [PATCH 1/5] fix safe buffer opt-out region serialization --- clang/

[clang] [Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-06-07 Thread Ziqing Luo via cfe-commits
@@ -0,0 +1,41 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -emit-module -fmodule-name=safe_buffers_test_base -x c++ %S/Inputs/SafeBuffers/safe_buffers_test.modulemap -std=c++20\ +// RUN: -o %t/safe_buffers_test_base.pcm -Wunsafe-buffer-usage +//

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-07 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/94549 >From 36618e65d94ffa3e83464b7d19ff6cd7d5855abf Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Wed, 5 Jun 2024 16:51:51 -0700 Subject: [PATCH 1/2] [Offload][NFCI] Initialize the KernelArgsTy to default

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #75841)

2024-06-07 Thread Brad Smith via cfe-commits
brad0 wrote: @ldionne Ping. https://github.com/llvm/llvm-project/pull/75841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Jakub Kuderski via cfe-commits
@@ -68,6 +68,10 @@ enum class fltNonfiniteBehavior { // `fltNanEncoding` enum. We treat all NaNs as quiet, as the available // encodings do not distinguish between signalling and quiet NaN. NanOnly, + + // This behavior is present in Float6E3M2FN and Float6E2M3FN types.

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar edited https://github.com/llvm/llvm-project/pull/94735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][OpenMP] This is addition fix for #92210. (PR #94802)

2024-06-07 Thread via cfe-commits
https://github.com/jyu2-git created https://github.com/llvm/llvm-project/pull/94802 Fix another runtime problem when explicit map both pointer and pointee in target data region. In #92210, problem is only addressed in target region, but missing for target data region. The change just passing

[clang] [clang][OpenMP][NFC] Remove unnecessary nullptr check (PR #94680)

2024-06-07 Thread David Pagan via cfe-commits
https://github.com/ddpagan commented: LGTM. https://github.com/llvm/llvm-project/pull/94680 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][OpenMP] This is addition fix for #92210. (PR #94802)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-offload Author: None (jyu2-git) Changes Fix another runtime problem when explicit map both pointer and pointee in target data region. In #92210, problem is only addressed in target region, but missing for target data

[clang] [llvm] [Clang][OpenMP] This is addition fix for #92210. (PR #94802)

2024-06-07 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 f8afa763c6194f5bf485480e1fb94b953942f876 157744f968ff9bc23efdfd0ee5c9a3e23f9413da --

[clang] [llvm] [APFloat] Add APFloat support for FP6 data types (PR #94735)

2024-06-07 Thread Krzysztof Drewniak via cfe-commits
krzysz00 wrote: @ThomasRaoux No, I just left a nitpick. I'm happy with the state of this. https://github.com/llvm/llvm-project/pull/94735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-06-07 Thread Dana Jansens via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] [llvm] [CodeGen][arm64e] Add methods and data members to Address, which are needed to authenticate signed pointers (PR #86923)

2024-06-07 Thread Akira Hatanaka via cfe-commits
@@ -201,14 +211,26 @@ template <> struct DominatingValue { class saved_type { enum Kind { ScalarLiteral, ScalarAddress, AggregateLiteral, AggregateAddress, ComplexAddress }; - -llvm::Value *Value; -llvm::Type *ElementType; +union { + struc

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-06-07 Thread Fangrui Song via cfe-commits
@@ -86,6 +86,8 @@ DYNAMIC_TAG(RELRSZ, 35) // Size of Relr relocation table. DYNAMIC_TAG(RELR, 36)// Address of relocation table (Relr entries). DYNAMIC_TAG(RELRENT, 37) // Size of a Relr relocation entry. +DYNAMIC_TAG(CREL, 38) // CREL relocation table + --

[clang] [llvm] [Clang][OpenMP] This is addition fix for #92210. (PR #94802)

2024-06-07 Thread via cfe-commits
https://github.com/jyu2-git updated https://github.com/llvm/llvm-project/pull/94802 >From 157744f968ff9bc23efdfd0ee5c9a3e23f9413da Mon Sep 17 00:00:00 2001 From: Jennifer Yu Date: Wed, 5 Jun 2024 13:53:34 -0700 Subject: [PATCH 1/2] [Clang][OpenMP] This is addition fix for #92210. Fix another r

[clang] [llvm] [CodeGen][arm64e] Add methods and data members to Address, which are needed to authenticate signed pointers (PR #86923)

2024-06-07 Thread Akira Hatanaka via cfe-commits
@@ -201,14 +211,26 @@ template <> struct DominatingValue { class saved_type { enum Kind { ScalarLiteral, ScalarAddress, AggregateLiteral, AggregateAddress, ComplexAddress }; - -llvm::Value *Value; -llvm::Type *ElementType; +union { + struc

[clang] [clang-format] Fix bad comment indentation before ifdef after braceless if (PR #94776)

2024-06-07 Thread Erich Reitz via cfe-commits
https://github.com/Erich-Reitz updated https://github.com/llvm/llvm-project/pull/94776 >From 6c910c8b40be79e3d573f6953860f60ebd27b39f Mon Sep 17 00:00:00 2001 From: Erich Reitz Date: Fri, 7 Jun 2024 13:04:33 -0400 Subject: [PATCH 1/4] delay flushing comments before ifdef after braceless if; al

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

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

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

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

[clang] [clang][OpenMP] Fix teams nesting of region check (PR #94806)

2024-06-07 Thread Mike Rice via cfe-commits
https://github.com/mikerice1969 created https://github.com/llvm/llvm-project/pull/94806 The static verifier flagged dead code in the check since the loop will only execute once and never reach the iterator increment. The loop needs to iterate twice to correctly diagnose when a statement is aft

[clang] [clang][OpenMP] Fix teams nesting of region check (PR #94806)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mike Rice (mikerice1969) Changes The static verifier flagged dead code in the check since the loop will only execute once and never reach the iterator increment. The loop needs to iterate twice to correctly diagnose when a statement is af

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-07 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/94717 >From eeb334620df72c395a5ad27f44a864a6a0c194a5 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 6 Jun 2024 23:18:12 -0400 Subject: [PATCH 1/4] [clang][clang-doc] add asset path --- .../clang-doc/tool/Cla

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-07 Thread via cfe-commits
@@ -131,12 +137,55 @@ std::string GetExecutablePath(const char *Argv0, void *MainAddr) { return llvm::sys::fs::getMainExecutable(Argv0, MainAddr); } +void GetAssetFiles(clang::doc::ClangDocContext &CDCtx) { + std::error_code Code; + for (auto DirIt = llvm::sys::fs::direct

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-07 Thread via cfe-commits
@@ -182,23 +231,12 @@ Example usage for a project using a compile commands database: {"index.js", "index_json.js"}}; if (Format == "html") { -void *MainAddr = (void *)(intptr_t)GetExecutablePath; -std::string ClangDocPath = GetExecutablePath(argv[0], MainAddr)

[clang] [llvm] Revert changes in AddDefaultGCCPrefixes() for SystemZTriples. (PR #94729)

2024-06-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/94729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-07 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/94549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-07 Thread Artem Belevich via cfe-commits
@@ -,17 +6684,26 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, break; } } else { +if (Args.hasFlag(options::OPT_foffload_via_llvm, + options::OPT_fno_offload_via_llvm, false)) + Args.AddLastArg(CmdArgs, options::O

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-07 Thread Artem Belevich via cfe-commits
@@ -1125,6 +1125,22 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA, CmdArgs.push_back("__clang_openmp_device_functions.h"); } + if (Args.hasArg(options::OPT_foffload_via_llvm)) { +// Add llvm_wrappers/* to our system include path. This

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-07 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. LGTM in principle. Will kernels in TUs compiled with `-foffload-via-llvm` be interoperable with code that wants to launch them from another TU compiled w/o `-foffload-via-llvm` ? E.g.: - a.cu: `__global__ void kernel() { ... }` - b.cu: `e

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-07 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,31 @@ +/*===-- LLVM/Offload helpers for kernel languages (CUDA/HIP) -*- 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: Apach

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

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

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

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

[clang] [clang-format] Fix bad comment indentation before ifdef after braceless if (PR #94776)

2024-06-07 Thread Erich Reitz via cfe-commits
https://github.com/Erich-Reitz updated https://github.com/llvm/llvm-project/pull/94776 >From 6c910c8b40be79e3d573f6953860f60ebd27b39f Mon Sep 17 00:00:00 2001 From: Erich Reitz Date: Fri, 7 Jun 2024 13:04:33 -0400 Subject: [PATCH 1/5] delay flushing comments before ifdef after braceless if; al

[clang] [clang-format] Fix bad comment indentation before ifdef after braceless if (PR #94776)

2024-06-07 Thread Erich Reitz via cfe-commits
@@ -796,6 +796,24 @@ TEST_F(FormatTestComments, ParsesCommentsAdjacentToPPDirectives) { format("namespace {}\n /* Test */#define A")); } + +TEST_F(FormatTestComments, DeIdentsCommentBeforeIfdefAfterBracelessIf) { + EXPECT_EQ("void f() {\n"

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

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

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

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

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Helena Kotas (hekota) Changes In DXC the default linkage of HLSL function is `internal` unless it is: 1. shader entry point function 2. marked with the `export` keyword (#92812) 3. does not have a definition This PR imp

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

2024-06-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Helena Kotas (hekota) Changes In DXC the default linkage of HLSL function is `internal` unless it is: 1. shader entry point function 2. marked with the `export` keyword (#92812) 3. does not have a definition This PR implements D

[clang] [HLSL] Use llvm::Triple::EnvironmentType instead of HLSLShaderAttr::ShaderType (PR #93847)

2024-06-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/93847 >From dd175a247480396b9d35cb995333fcd14152e347 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 29 May 2024 18:38:45 -0700 Subject: [PATCH 1/4] [HLSL] Use llvm::Triple::EnvironmentType instead of ShaderType

[clang-tools-extra] c4f83a0 - [clang-tidy] new check misc-use-internal-linkage (#90830)

2024-06-07 Thread via cfe-commits
Author: Congcong Cai Date: 2024-06-08T06:46:39+08:00 New Revision: c4f83a004bf35bfc46fe89111fdca750bbc724da URL: https://github.com/llvm/llvm-project/commit/c4f83a004bf35bfc46fe89111fdca750bbc724da DIFF: https://github.com/llvm/llvm-project/commit/c4f83a004bf35bfc46fe89111fdca750bbc724da.diff

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

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

[clang] [llvm] [Clang] Introduce [[clang::coro_structured_concurrency]] (PR #94693)

2024-06-07 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

2024-06-07 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -108,3 +108,16 @@ behavior between Clang and DXC. Some examples include: diagnostic notifying the user of the conversion rather than silently altering precision relative to the other overloads (as FXC does) or generating code that will fail validation (as DXC does). +

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-06-07 Thread Mike Rice via cfe-commits
@@ -1117,6 +1118,31 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, if (isImaginary) break; // Cannot be repeated. isImaginary = true; continue; // Success. +case '_': + if (isFPConstant) +break; // Invalid for floats

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-07 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/94559 >From 51247e430ad49c4729e2e3664104367b13fbad9e Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Fri, 24 May 2024 10:01:52 -0400 Subject: [PATCH 1/2] [clang] Add tanf16 builtin and support for tan constrained in

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-06-07 Thread via cfe-commits
@@ -1117,6 +1118,31 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, if (isImaginary) break; // Cannot be repeated. isImaginary = true; continue; // Success. +case '_': + if (isFPConstant) +break; // Invalid for floats

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-06-07 Thread Julian Schmidt via cfe-commits
@@ -95,9 +106,59 @@ bool ExprSequence::inSequence(const Stmt *Before, const Stmt *After) const { return true; } + SmallVector BeforeParents = getParentStmts(Before, Context); + + // Since C++17, the callee of a call expression is guaranteed to be sequenced + // bef

<    1   2   3   4   5   >