[flang] [libcxx] [compiler-rt] [llvm] [libc] [lldb] [lld] [clang-tools-extra] [clang] [AMDGPU] Use alias info to relax waitcounts for LDS DMA (PR #74537)

2024-01-12 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/74537 >From 7e382620cdc5999c645ed0746f242595f0294c58 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Mon, 4 Dec 2023 16:11:53 -0800 Subject: [PATCH 01/10] [AMDGPU] Use alias info to relax waitcounts for

[clang] [clang] Adjust -mlarge-data-threshold handling (PR #77958)

2024-01-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/77958 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Adjust -mlarge-data-threshold handling (PR #77958)

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

[llvm] [clang] [AMDGPU] Add global_load_tr for GFX12 (PR #77772)

2024-01-12 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng deleted https://github.com/llvm/llvm-project/pull/2 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Stop aligning the to continuation lines (PR #76378)

2024-01-12 Thread Björn Schäpers via cfe-commits
@@ -1304,6 +1304,18 @@ TEST_F(FormatTestCSharp, CSharpGenericTypeConstraints) { "}", Style); + // When the where line is not to be formatted, following lines should not take + // on its indentation. + verifyFormat("class ItemFactory\n"

[clang] [clang-format] Stop aligning the to continuation lines (PR #76378)

2024-01-12 Thread Björn Schäpers via cfe-commits
@@ -1304,6 +1304,18 @@ TEST_F(FormatTestCSharp, CSharpGenericTypeConstraints) { "}", Style); + // When the where line is not to be formatted, following lines should not take HazardyKnusperkeks wrote: ```suggestion // When

[clang] [clang-format] Stop aligning the to continuation lines (PR #76378)

2024-01-12 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: > Can someone review this please? Did you see it when I opened the pull request > 2 weeks ago or only when I added the reviewers just now? I thought reviewers > would be added automatically. Every member of @pr-subscribers-clang-format will be informed, and I look

[clang] [Format] Fix isStartOfName to recognize attributes (PR #76804)

2024-01-12 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/76804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-12 Thread Björn Schäpers via cfe-commits
@@ -586,7 +586,8 @@ template <> struct ScalarEnumerationTraits { static void enumeration(IO , FormatStyle::SeparateDefinitionStyle ) { IO.enumCase(Value, "Leave", FormatStyle::SDS_Leave); -IO.enumCase(Value, "Always", FormatStyle::SDS_Always); +

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-12 Thread Björn Schäpers via cfe-commits
@@ -17,80 +17,97 @@ namespace clang { namespace format { namespace { +std::string +separateDefinitionBlocks(llvm::StringRef Code, + const std::vector , + const FormatStyle = getLLVMStyle()) { + LLVM_DEBUG(llvm::errs() <<

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-12 Thread Björn Schäpers via cfe-commits
@@ -65,18 +81,18 @@ void DefinitionBlockSeparator::separateBlocks( } return false; }; - unsigned NewlineCount = - (Style.SeparateDefinitionBlocks == FormatStyle::SDS_Always ? 1 : 0) + 1; + unsigned NewlineCount =

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-12 Thread Björn Schäpers via cfe-commits
@@ -65,18 +81,18 @@ void DefinitionBlockSeparator::separateBlocks( } return false; }; - unsigned NewlineCount = - (Style.SeparateDefinitionBlocks == FormatStyle::SDS_Always ? 1 : 0) + 1; + unsigned NewlineCount =

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-12 Thread Björn Schäpers via cfe-commits
@@ -586,7 +586,8 @@ template <> struct ScalarEnumerationTraits { static void enumeration(IO , FormatStyle::SeparateDefinitionStyle ) { IO.enumCase(Value, "Leave", FormatStyle::SDS_Leave); -IO.enumCase(Value, "Always", FormatStyle::SDS_Always); +

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-12 Thread Björn Schäpers via cfe-commits
@@ -171,6 +187,31 @@ void DefinitionBlockSeparator::separateBlocks( return false; }; +// Separate License text. +const bool isComment = Lines[I]->isComment(); HazardyKnusperkeks wrote: ```suggestion const bool IsComment =

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-12 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks edited https://github.com/llvm/llvm-project/pull/77918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-12 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks requested changes to this pull request. I think you want too much in one change. Maybe first only handle #42112 for what I will be really grateful. And then the stuff with the _license_, because I see discussion there. As far as I can tell you just

[libcxx] [llvm] [openmp] [clang] [compiler-rt] [lld] [libcxxabi] [mlir] [runtimes] Use LLVM libunwind from libc++abi by default (PR #77687)

2024-01-12 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: @petrhosek @ldionne would it be better detect libunwind in LLVM_ENABLE_RUNTIMES? We have similar thing for lld in compiler-rt. There are trade offs: 1. checking LLVM_ENABLE_RUNTIMES simplify out of the end user experience, 1. forcing default ON simplifies cmake files and

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2024-01-12 Thread via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2024-01-12 Thread via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add global_load_tr for GFX12 (PR #77772)

2024-01-12 Thread Changpeng Fang via cfe-commits
@@ -2496,6 +2496,26 @@ def int_amdgcn_flat_atomic_fmax_num : AMDGPUAtomicRtn; def int_amdgcn_global_atomic_fmin_num : AMDGPUAtomicRtn; def int_amdgcn_global_atomic_fmax_num : AMDGPUAtomicRtn; +class AMDGPUGlobalLoadTr : + Intrinsic< +[data_ty], +[global_ptr_ty], +

[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-01-12 Thread Björn Schäpers via cfe-commits
@@ -17016,6 +17056,158 @@ TEST_F(FormatTest, ConfigurableSpacesInParens) { verifyFormat("size_t idx = (a->foo)(a - 1);", Spaces); verifyFormat("size_t idx = (*foo)(a - 1);", Spaces); verifyFormat("size_t idx = (*(foo))(a - 1);", Spaces); + + // Check NonConsecutive

[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-01-12 Thread Björn Schäpers via cfe-commits
@@ -17001,6 +17056,158 @@ TEST_F(FormatTest, ConfigurableSpacesInParens) { verifyFormat("size_t idx = (a->foo)(a - 1);", Spaces); verifyFormat("size_t idx = (*foo)(a - 1);", Spaces); verifyFormat("size_t idx = (*(foo))(a - 1);", Spaces); + + // Check NonConsecutive

[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-01-12 Thread Björn Schäpers via cfe-commits
@@ -17016,6 +17056,158 @@ TEST_F(FormatTest, ConfigurableSpacesInParens) { verifyFormat("size_t idx = (a->foo)(a - 1);", Spaces); verifyFormat("size_t idx = (*foo)(a - 1);", Spaces); verifyFormat("size_t idx = (*(foo))(a - 1);", Spaces); + + // Check NonConsecutive

[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-01-12 Thread Björn Schäpers via cfe-commits
@@ -4007,26 +3992,45 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine , return true; } - // TODO: check consecutive parens if (Left.is(tok::l_paren) || Right.is(tok::r_paren)) { -if (Right.is(TT_CastRParen) || -(Left.MatchingParen &&

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-12 Thread via cfe-commits
https://github.com/weiguozhi updated https://github.com/llvm/llvm-project/pull/76868 >From 90e14918a0eb13e2187f8548416ac72491d966c1 Mon Sep 17 00:00:00 2001 From: Guozhi Wei Date: Thu, 21 Dec 2023 19:04:44 + Subject: [PATCH 1/3] New calling convention preserve_none The new calling

[clang] [AMDGPU] add function attrbute amdgpu-lib-fun (PR #74737)

2024-01-12 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > > An AMDGPU library function is not internalized and can be used to > > > fullfill calls generated by LLVM passes or instruction selection. > > > > > > I am confused by the description of "internalized". Do you refer to LTO > > internalization? You can leverage `llvm.used`

[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

2024-01-12 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/77013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2024-01-12 Thread Amy Kwan via cfe-commits
@@ -210,6 +210,15 @@ let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.". [llvm_float_ty], [llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_vararg_ty], [IntrNoMem]>; + // Load of a value provided by the system library

[llvm] [clang] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2024-01-12 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan commented: I think I primarily have minor nit comments. Thank you for the update, Nemanja. https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[llvm] [clang] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2024-01-12 Thread Amy Kwan via cfe-commits
@@ -1,11 +1,16 @@ -// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm < %s| FileCheck %s +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm < %s | FileCheck %s \ +// RUN: --check-prefix=CHECK-X86 +// RUN: %clang_cc1 -triple ppc64le-linux-gnu -emit-llvm < %s |

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2024-01-12 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan edited https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [AArch64][SVE2] Lower OR to SLI/SRI (PR #77555)

2024-01-12 Thread Usman Nadeem via cfe-commits
https://github.com/UsmanNadeem closed https://github.com/llvm/llvm-project/pull/77555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][DWARF] Fix accelerator table switching between CU and TU (PR #77511)

2024-01-12 Thread Alexander Yermolovich via cfe-commits
ayermolo wrote: > Could this be caused by the patch > https://lab.llvm.org/buildbot/#/builders/236/builds/8673 ? Passes for me locally. Also patch impacts .debug_names for DWARF. So highly unlikely it would cause this test to fail. https://github.com/llvm/llvm-project/pull/77511

[clang] [AMDGPU] add function attrbute amdgpu-lib-fun (PR #74737)

2024-01-12 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > > An AMDGPU library function is not internalized and can be used to fullfill > > calls generated by LLVM passes or instruction selection. > > I am confused by the description of "internalized". Do you refer to LTO > internalization? You can leverage `llvm.used` to disable

[llvm] [clang] [CMake][PGO] Build Sema.cpp to generate profdata for PGO builds (PR #77347)

2024-01-12 Thread Tom Stellard via cfe-commits
@@ -26,9 +30,23 @@ if(LLVM_BUILD_INSTRUMENTED) message(STATUS "To enable merging PGO data LLVM_PROFDATA has to point to llvm-profdata") else() add_custom_target(generate-profdata - COMMAND "${Python3_EXECUTABLE}" ${CMAKE_CURRENT_SOURCE_DIR}/perf-helper.py

[clang] [clang] Adjust -mlarge-data-threshold handling (PR #77958)

2024-01-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/77958 >From 3a54757173faffe07da55223c52621691afad54d Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Fri, 12 Jan 2024 18:13:06 + Subject: [PATCH 1/2] [clang] Adjust -mlarge-data-threshold handling Make it

[openmp] [libcxx] [llvm] [mlir] [lld] [clang] [libc++] Deprecate the _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS macro (PR #77692)

2024-01-12 Thread James Y Knight via cfe-commits
jyknight wrote: My suggestion on #69994 had been to stop implying `_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS` from `_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES` in LLVM 18 at the same time as deprecating it. Did you intend to _not_ do that, or was it just missed?

[libcxx] [clang] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/77768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [clang] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. https://github.com/llvm/llvm-project/pull/77768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-12 Thread Vlad Serebrennikov via cfe-commits
@@ -132,6 +142,36 @@ namespace dr2126 { // dr2126: 12 #endif } +namespace dr2137 { // dr2137: 18 +#if __cplusplus >= 201103L + struct Q { +Q(); +Q(Q&&); +Q(std::initializer_list) = delete; // since-cxx11-note 2 {{has been explicitly marked deleted here}} + }; +

[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

2024-01-12 Thread Erich Keane via cfe-commits
@@ -3767,6 +3767,57 @@ void DependentDecltypeType::Profile(llvm::FoldingSetNodeID , E->Profile(ID, Context, true); } +PackIndexingType::PackIndexingType(const ASTContext , + QualType Canonical, QualType Pattern, +

[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

2024-01-12 Thread Erich Keane via cfe-commits
@@ -1665,6 +1665,43 @@ NonTypeTemplateParmDecl *SubstNonTypeTemplateParmExpr::getParameter() const { getReplacedTemplateParameterList(getAssociatedDecl())->asArray()[Index]); } +PackIndexingExpr *PackIndexingExpr::Create(ASTContext , +

[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

2024-01-12 Thread Erich Keane via cfe-commits
@@ -4344,6 +4344,108 @@ class SizeOfPackExpr final } }; +class PackIndexingExpr final +: public Expr, + private llvm::TrailingObjects { + friend class ASTStmtReader; + friend class ASTStmtWriter; + friend TrailingObjects; + + SourceLocation EllipsisLoc; + + //

[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

2024-01-12 Thread Erich Keane via cfe-commits
@@ -4344,6 +4344,108 @@ class SizeOfPackExpr final } }; +class PackIndexingExpr final +: public Expr, + private llvm::TrailingObjects { + friend class ASTStmtReader; + friend class ASTStmtWriter; + friend TrailingObjects; + + SourceLocation EllipsisLoc; + + //

[clang] [OpenACC} Improve diagnostics for 'tag's on clauses/directives (PR #77957)

2024-01-12 Thread Erich Keane via cfe-commits
erichkeane wrote: > LG with a nit Thanks for the super quick reviews! https://github.com/llvm/llvm-project/pull/77957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC} Improve diagnostics for 'tag's on clauses/directives (PR #77957)

2024-01-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/77957 >From 12f5f321bc47bffb2d1694e605288c59976022e6 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 12 Jan 2024 09:30:54 -0800 Subject: [PATCH 1/4] [OpenACC} Improve diagnostics for 'tag's on

[clang] [OpenACC} Improve diagnostics for 'tag's on clauses/directives (PR #77957)

2024-01-12 Thread Alexey Bataev via cfe-commits
@@ -164,6 +164,48 @@ bool isOpenACCSpecialToken(OpenACCSpecialTokenKind Kind, Token Tok) { llvm_unreachable("Unknown 'Kind' Passed"); } +// Used for cases where we have a token we want to check against an +// 'identifier-like' token, but don't want to give awkward error

[clang] [OpenACC} Improve diagnostics for 'tag's on clauses/directives (PR #77957)

2024-01-12 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG with a nit https://github.com/llvm/llvm-project/pull/77957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC} Improve diagnostics for 'tag's on clauses/directives (PR #77957)

2024-01-12 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/77957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][DWARF] Fix accelerator table switching between CU and TU (PR #77511)

2024-01-12 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Could this be caused by the patch https://lab.llvm.org/buildbot/#/builders/236/builds/8673 ? https://github.com/llvm/llvm-project/pull/77511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [OpenACC} Improve diagnostics for 'tag's on clauses/directives (PR #77957)

2024-01-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/77957 >From 12f5f321bc47bffb2d1694e605288c59976022e6 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 12 Jan 2024 09:30:54 -0800 Subject: [PATCH 1/3] [OpenACC} Improve diagnostics for 'tag's on

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-12 Thread John McCall via cfe-commits
@@ -2669,6 +2669,8 @@ bool QualType::isTriviallyRelocatableType(const ASTContext ) const { return false; } else if (const auto *RD = BaseElementType->getAsRecordDecl()) { return RD->canPassInRegisters(); + } else if

[clang] [llvm] [AMDGPU] Add global_load_tr for GFX12 (PR #77772)

2024-01-12 Thread Changpeng Fang via cfe-commits
@@ -18178,6 +18178,51 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Function *F = CGM.getIntrinsic(IID, {ArgTy}); return Builder.CreateCall(F, {Addr, Val, ZeroI32, ZeroI32, ZeroI1}); } + case

[clang] [OpenMP][USM] Adds test for -fopenmp-force-usm flag (PR #75467)

2024-01-12 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert approved this pull request. https://github.com/llvm/llvm-project/pull/75467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC} Improve diagnostics for 'tag's on clauses/directives (PR #77957)

2024-01-12 Thread Alexey Bataev via cfe-commits
@@ -164,6 +164,49 @@ bool isOpenACCSpecialToken(OpenACCSpecialTokenKind Kind, Token Tok) { llvm_unreachable("Unknown 'Kind' Passed"); } +// Used for cases where we have a token we want to check against an +// 'identifier-like' token, but don't want to give awkward error

[clang] [clang] Adjust -mlarge-data-threshold handling (PR #77958)

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

[clang] [clang] Adjust -mlarge-data-threshold handling (PR #77958)

2024-01-12 Thread Fangrui Song via cfe-commits
@@ -5752,20 +5752,29 @@ void Clang::ConstructJob(Compilation , const JobAction , } } - if (Arg *A = Args.getLastArg(options::OPT_mlarge_data_threshold_EQ)) { -if (!Triple.isX86()) { - D.Diag(diag::err_drv_unsupported_opt_for_target) - <<

[clang] [clang-format] Handle possible crash in `getCells` (PR #77723)

2024-01-12 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/77723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 97a9dbb - [clang-format] Handle possible crash in `getCells` (#77723)

2024-01-12 Thread via cfe-commits
Author: XDeme Date: 2024-01-12T10:20:44-08:00 New Revision: 97a9dbb64919fe71379cda5f043633cbeb6438e5 URL: https://github.com/llvm/llvm-project/commit/97a9dbb64919fe71379cda5f043633cbeb6438e5 DIFF: https://github.com/llvm/llvm-project/commit/97a9dbb64919fe71379cda5f043633cbeb6438e5.diff LOG:

[lldb] [clang] [clang-tools-extra] [llvm] [lldb][test] Add tests for target.max-string-summary-length setting (PR #77920)

2024-01-12 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/77920 >From 4de3716b55a22dc8b7dda621889089f390026739 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 12 Jan 2024 12:34:16 + Subject: [PATCH 1/2] [lldb][test] Add tests for

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -7519,6 +7519,26 @@ static bool HandleWebAssemblyFuncrefAttr(TypeProcessingState , return false; } +/// Rebuild an attributed type without the nullability attribute on it. +static QualType rebuildAttributedTypeWithoutNullability(ASTContext , +

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -7539,74 +7559,65 @@ static NullabilityKind mapNullabilityAttrKind(ParsedAttr::Kind kind) { } } -/// Applies a nullability type specifier to the given type, if possible. -/// -/// \param state The type processing state. -/// -/// \param type The type to which the

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -7519,6 +7519,26 @@ static bool HandleWebAssemblyFuncrefAttr(TypeProcessingState , return false; } +/// Rebuild an attributed type without the nullability attribute on it. +static QualType rebuildAttributedTypeWithoutNullability(ASTContext , +

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -15139,6 +15139,37 @@ void Sema::DiagnoseSizeOfParametersAndReturnValue( } } +QualType Sema::AdjustParameterTypeForObjCAutoRefCount(QualType T, + SourceLocation NameLoc, +

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -7539,74 +7559,65 @@ static NullabilityKind mapNullabilityAttrKind(ParsedAttr::Kind kind) { } } -/// Applies a nullability type specifier to the given type, if possible. -/// -/// \param state The type processing state. -/// -/// \param type The type to which the

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -15139,6 +15139,37 @@ void Sema::DiagnoseSizeOfParametersAndReturnValue( } } +QualType Sema::AdjustParameterTypeForObjCAutoRefCount(QualType T, + SourceLocation NameLoc, +

[clang] [OpenACC} Improve diagnostics for 'tag's on clauses/directives (PR #77957)

2024-01-12 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 e4d01bb2273804355cf84a8a560e578735590ac2 12f5f321bc47bffb2d1694e605288c59976022e6 --

[clang] [clang] Adjust -mlarge-data-threshold handling (PR #77958)

2024-01-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Arthur Eubanks (aeubanks) Changes Make it apply to x86-64 medium and large code models since that's what the backend does. Warn if it's used for x86-32. Default to 0, let the driver set it to 65536 for

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2024-01-12 Thread Yeoul Na via cfe-commits
rapidsna wrote: Rebased https://github.com/llvm/llvm-project/pull/70749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Adjust -mlarge-data-threshold handling (PR #77958)

2024-01-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/77958 Make it apply to x86-64 medium and large code models since that's what the backend does. Warn if it's used for x86-32. Default to 0, let the driver set it to 65536 for the medium code model if one is not

[clang] [OpenACC} Improve diagnostics for 'tag's on clauses/directives (PR #77957)

2024-01-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes The 'cache' directive and various clauses have a 'tag' name that is optional. This patch cleans up the use of the 'cache' version so that we get a nicer diagnostic, and enables us to do the same with

[clang] [OpenACC} Improve diagnostics for 'tag's on clauses/directives (PR #77957)

2024-01-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/77957 The 'cache' directive and various clauses have a 'tag' name that is optional. This patch cleans up the use of the 'cache' version so that we get a nicer diagnostic, and enables us to do the same with

[clang] [Format] Fix isStartOfName to recognize attributes (PR #76804)

2024-01-12 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/76804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [lldb] [libcxx] [clang] [flang] [mlir] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-12 Thread Fangrui Song via cfe-commits
@@ -56966,6 +56965,17 @@ void X86TargetLowering::LowerAsmOperandForConstraint(SDValue Op, } return; } + case 'W': { +assert(Constraint[1] == 's'); +if (const auto *GA = dyn_cast(Op)) { + Ops.push_back(DAG.getTargetGlobalAddress(GA->getGlobal(),

[llvm] [clang-tools-extra] [lldb] [libcxx] [clang] [flang] [mlir] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-12 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,34 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc -mtriple=i686 < %s | FileCheck %s +; RUN: llc -mtriple=x86_64 < %s | FileCheck %s + +@var = external dso_local global i32, align 4 + +define dso_local void @test() { +;

[llvm] [clang-tools-extra] [lldb] [libcxx] [clang] [flang] [mlir] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-12 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/77886 >From f5a33f9e6893250e3584a77630b771ee76693c20 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 11 Jan 2024 23:42:38 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] 3bbc912 - [Driver,test] Update sanitizer test after RequiresPIE removal #77689

2024-01-12 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-01-12T10:09:53-08:00 New Revision: 3bbc912d37f03d9ad3be330b81d91c2eaf6c37f2 URL: https://github.com/llvm/llvm-project/commit/3bbc912d37f03d9ad3be330b81d91c2eaf6c37f2 DIFF: https://github.com/llvm/llvm-project/commit/3bbc912d37f03d9ad3be330b81d91c2eaf6c37f2.diff

[clang] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-12 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/77936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-12 Thread Jon Roelofs via cfe-commits
@@ -812,6 +819,23 @@ Address AArch64ABIInfo::EmitMSVAArg(CodeGenFunction , Address VAListAddr, /*allowHigherAlign*/ false); } +void AArch64TargetCodeGenInfo::checkFunctionCallABI( +CodeGenModule , SourceLocation CallLoc, const FunctionDecl

[llvm] [clang-tools-extra] [libclc] [libc] [lld] [lldb] [clang] [libcxx] [libcxxabi] [flang] [libunwind] [compiler-rt] [builtins] Generate __multc3 for z/OS (PR #77554)

2024-01-12 Thread Alexander Richardson via cfe-commits
@@ -374,10 +376,10 @@ static __inline fp_t __compiler_rt_fmax(fp_t x, fp_t y) { #endif } -#elif defined(QUAD_PRECISION) && defined(CRT_HAS_TF_MODE) +#elif defined(QUAD_PRECISION) arichardson wrote: Looks like this was actually required. Probably needs to be

[clang] [llvm] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-12 Thread Fangrui Song via cfe-commits
@@ -5336,6 +5336,7 @@ X86: operand in a SSE register. If AVX is also enabled, can also be a 256-bit vector operand in an AVX register. If AVX-512 is also enabled, can also be a 512-bit vector operand in an AVX512 register. Otherwise, an error. +- ``Ws``: A symbolic

[clang-tools-extra] [clang-tidy] Fix false-positives in readability-container-size-empty (PR #74140)

2024-01-12 Thread Justin Cady via cfe-commits
https://github.com/justincady approved this pull request. [Context](https://github.com/llvm/llvm-project/pull/77203#pullrequestreview-1818501835). LGTM. https://github.com/llvm/llvm-project/pull/74140 ___ cfe-commits mailing list

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2024-01-12 Thread Yeoul Na via cfe-commits
rapidsna wrote: > Thank you for the updates; the changes LGTM! @AaronBallman Thanks for your review and insightful feedback! https://github.com/llvm/llvm-project/pull/70749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tid]fix modernize-use-auto incorrect fix hints for pointer (PR #77943)

2024-01-12 Thread Piotr Zegar via cfe-commits
@@ -405,12 +421,20 @@ void UseAutoCheck::replaceExpr( auto Diag = diag(Range.getBegin(), Message); + bool ShouldReplenishVariableName = isMutliLevelPointerToTypeLocClasses( + FirstDecl->getTypeSourceInfo()->getTypeLoc(), + {TypeLoc::FunctionProto,

[clang-tools-extra] [clang-tid]fix modernize-use-auto incorrect fix hints for pointer (PR #77943)

2024-01-12 Thread Piotr Zegar via cfe-commits
@@ -333,6 +335,26 @@ void UseAutoCheck::replaceIterators(const DeclStmt *D, ASTContext *Context) { << FixItHint::CreateReplacement(Range, "auto"); } +namespace { + +void ignoreTypeLocClasses( +TypeLoc , llvm::SmallVector const ) { PiotrZSL wrote:

[clang-tools-extra] [clang-tid]fix modernize-use-auto incorrect fix hints for pointer (PR #77943)

2024-01-12 Thread Piotr Zegar via cfe-commits
@@ -333,6 +335,26 @@ void UseAutoCheck::replaceIterators(const DeclStmt *D, ASTContext *Context) { << FixItHint::CreateReplacement(Range, "auto"); } +namespace { + +void ignoreTypeLocClasses( +TypeLoc , llvm::SmallVector const ) { + while

[clang-tools-extra] [clang-tid]fix modernize-use-auto incorrect fix hints for pointer (PR #77943)

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

[clang-tools-extra] [clang-tid]fix modernize-use-auto incorrect fix hints for pointer (PR #77943)

2024-01-12 Thread Piotr Zegar via cfe-commits
@@ -405,12 +421,20 @@ void UseAutoCheck::replaceExpr( auto Diag = diag(Range.getBegin(), Message); + bool ShouldReplenishVariableName = isMutliLevelPointerToTypeLocClasses( + FirstDecl->getTypeSourceInfo()->getTypeLoc(), PiotrZSL wrote: Would be

[clang-tools-extra] [clang-tid]fix modernize-use-auto incorrect fix hints for pointer (PR #77943)

2024-01-12 Thread Piotr Zegar via cfe-commits
@@ -333,6 +335,26 @@ void UseAutoCheck::replaceIterators(const DeclStmt *D, ASTContext *Context) { << FixItHint::CreateReplacement(Range, "auto"); } +namespace { + +void ignoreTypeLocClasses( +TypeLoc , llvm::SmallVector const ) { + while

[clang-tools-extra] [clang-tid]fix modernize-use-auto incorrect fix hints for pointer (PR #77943)

2024-01-12 Thread Piotr Zegar via cfe-commits
@@ -333,6 +335,26 @@ void UseAutoCheck::replaceIterators(const DeclStmt *D, ASTContext *Context) { << FixItHint::CreateReplacement(Range, "auto"); } +namespace { + +void ignoreTypeLocClasses( PiotrZSL wrote: use static instead of anonymous namespace

[clang-tools-extra] [clang-tid]fix modernize-use-auto incorrect fix hints for pointer (PR #77943)

2024-01-12 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Missing tests for arrays and function pointers to confirm that fix work. + some nits or possible improvments https://github.com/llvm/llvm-project/pull/77943 ___ cfe-commits mailing

[llvm] [clang] [clang-tools-extra] [flang] [compiler-rt] [clang] Add test for CWG1807 (PR #77637)

2024-01-12 Thread Erich Keane via cfe-commits
erichkeane wrote: > > This brings me to conclusion that hand-written style of codegen tests > > presented above is a better fit for purposes of C++ defect report codegen > > tests. > > I share that conclusion. I think the hand-written IR is easier for people to > reason because it strips out

[clang] [clang-tools-extra] [compiler-rt] [flang] [llvm] [clang] Add test for CWG1807 (PR #77637)

2024-01-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/77637 >From 545ee4900e48b186e1c9fff93dc62a459ee19754 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 10 Jan 2024 20:27:53 +0300 Subject: [PATCH 1/7] [clang] Add test for CWG1807 The test checks that

[clang-tools-extra] [clang-tidy] Fix false-positives in misc-static-assert caused by non-constexpr variables (PR #77203)

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

[clang-tools-extra] 3af6ae0 - [clang-tidy] Fix false-positives in misc-static-assert caused by non-constexpr variables (#77203)

2024-01-12 Thread via cfe-commits
Author: Piotr Zegar Date: 2024-01-12T18:33:49+01:00 New Revision: 3af6ae0fbea40097e159c11893ee7ab57d00480c URL: https://github.com/llvm/llvm-project/commit/3af6ae0fbea40097e159c11893ee7ab57d00480c DIFF: https://github.com/llvm/llvm-project/commit/3af6ae0fbea40097e159c11893ee7ab57d00480c.diff

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-12 Thread via cfe-commits
@@ -0,0 +1,31 @@ +.. title:: clang-tidy - readability-use-std-min-max + +readability-use-std-min-max +=== + +Replaces certain conditional statements with equivalent ``std::min`` or ``std::max`` expressions, +improving readability and promoting the use of

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-12 Thread Mark de Wever via cfe-commits
https://github.com/mordante approved this pull request. Thanks @cor3ntin. The patch still looks fine from libc++'s PoV. https://github.com/llvm/llvm-project/pull/77768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -2622,6 +2641,31 @@ def SwiftPrivate : InheritableAttr { let SimpleHandler = 1; } +def SwiftVersioned : Attr { compnerd wrote: I think that we should name this `SwiftVersionedAddition` to match the `SwiftVersionedRemoval`.

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -2601,6 +2604,22 @@ def SwiftError : InheritableAttr { let Documentation = [SwiftErrorDocs]; } +def SwiftImportAsNonGeneric : InheritableAttr { compnerd wrote: Wasn't this attribute dropped? I thought that the last usage of this was removed from the

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -301,6 +301,9 @@ class VariadicEnumArgument values, bit IsExternalType = isExternalType; } +// Represents an attribute wrapped by another attribute. +class AttrArgument : Argument; compnerd wrote: Does it make sense to name this `WrappedAttribute`

<    1   2   3   4   5   >