[clang] [llvm] [clang][DebugInfo] Emit DW_AT_object_pointer on function declarations with explicit `this` (PR #122928)

2025-01-18 Thread Michał Górny via cfe-commits
mgorny wrote: Thanks! https://github.com/llvm/llvm-project/pull/122928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-18 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm requested changes to this pull request. Please address @saiislam's questions. I also think that the title and description of the PR should reflect that this PR not only introduces the 6.0 flag, but also moves several of the tests to test against 5.1 and 6.0. https:

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-18 Thread Jason Rice via cfe-commits
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, return New; } +// CheckBindingsCount +// - Checks the arity of the structured bindings +// - Creates the resolved pack expr if there is +//one +static bool CheckBindingsCount(Sema &S, D

[clang] [Clang] Make `-Wreturn-type` default to an error in all language modes (PR #123470)

2025-01-18 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/123470 >From 441385e14210f23a4fe5368d44620073a4347a31 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Sat, 18 Jan 2025 19:35:01 +0100 Subject: [PATCH 1/2] [Clang] Make -Wreturn-type default to an error in all language

[clang] 106c483 - [clang-format] Improve brace wrapping and add an option to control indentation of `export { ... }` (#110381)

2025-01-18 Thread via cfe-commits
Author: Sirraide Date: 2025-01-19T00:26:40+01:00 New Revision: 106c483a102e1328f11e2b1d9398f4ad2826b59f URL: https://github.com/llvm/llvm-project/commit/106c483a102e1328f11e2b1d9398f4ad2826b59f DIFF: https://github.com/llvm/llvm-project/commit/106c483a102e1328f11e2b1d9398f4ad2826b59f.diff LOG:

[clang] [clang-format] Add an option to control indentation of `export { ... }` (PR #110381)

2025-01-18 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/110381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [IR] Convert from nocapture to captures(none) (PR #123181)

2025-01-18 Thread via cfe-commits
@@ -5742,27 +5742,36 @@ bool AANoCapture::isImpliedByIR(Attributor &A, const IRPosition &IRP, return true; } - if (A.hasAttr(IRP, {Attribute::NoCapture}, -/* IgnoreSubsumingPositions */ true, Attribute::NoCapture)) -return true; + SmallVector Attrs

[clang] [Clang][Analysis] Don't treat the default switch path as unreachable when all enumerators are covered (PR #123166)

2025-01-18 Thread Jeremy Rifkin via cfe-commits
https://github.com/jeremy-rifkin updated https://github.com/llvm/llvm-project/pull/123166 >From e1ce92c0f54301cacaba316d38d44d20c6d61cb8 Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rif...@users.noreply.github.com> Date: Thu, 16 Jan 2025 00:27:03 -0600 Subject: [PATCH 1/4] Don't

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

2025-01-18 Thread Brad Smith via cfe-commits
brad0 wrote: Ping. https://github.com/llvm/llvm-project/pull/120149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Make `-Wreturn-type` default to an error in all language modes (PR #123470)

2025-01-18 Thread via cfe-commits
Sirraide wrote: Looks like I might have to fix some compiler-rt tests first; that might well end up being another separate pr. https://github.com/llvm/llvm-project/pull/123470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [clang-format] Add an option to control indentation of `export { ... }` (PR #110381)

2025-01-18 Thread Owen Pan via cfe-commits
owenca wrote: @Sirraide can you update it with another patch to address the following? - The new option needs a config parse test. - The option should be renamed to `IndentExternBlock`. (Other than a few exceptions, which should probably be renamed as well, we use "IndentSomething" instead of "

[clang] [clang-format] Add an option to control indentation of `export { ... }` (PR #110381)

2025-01-18 Thread via cfe-commits
Sirraide wrote: > @Sirraide can you update it with another patch to address the following? > > * The new option needs a config parse test. > * The option should be renamed to `IndentExternBlock`. (Other than a few > exceptions, which should probably be renamed as well, we use > "IndentSomethin

[clang] [clang-format] Rename ExportBlockIndentation -> IndentExportBlock (PR #123493)

2025-01-18 Thread Owen Pan via cfe-commits
@@ -1040,7 +1040,7 @@ template <> struct MappingTraits { Style.EmptyLineBeforeAccessModifier); IO.mapOptional("ExperimentalAutoDetectBinPacking", Style.ExperimentalAutoDetectBinPacking); -IO.mapOptional("ExportBlockIndentation", Sty

[clang] [clang-format] Rename ExportBlockIndentation -> IndentExportBlock (PR #123493)

2025-01-18 Thread Owen Pan via cfe-commits
@@ -1551,7 +1551,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { LLVMStyle.EmptyLineAfterAccessModifier = FormatStyle::ELAAMS_Never; LLVMStyle.EmptyLineBeforeAccessModifier = FormatStyle::ELBAMS_LogicalBlock; LLVMStyle.ExperimentalAutoDetectBinPacking

[clang] [clang-format] Rename ExportBlockIndentation -> IndentExportBlock (PR #123493)

2025-01-18 Thread Owen Pan via cfe-commits
@@ -5267,7 +5267,7 @@ struct FormatStyle { EmptyLineBeforeAccessModifier == R.EmptyLineBeforeAccessModifier && ExperimentalAutoDetectBinPacking == R.ExperimentalAutoDetectBinPacking && - ExportBlockIndentation == R.ExportBlockInden

[clang] [clang-format] Rename ExportBlockIndentation -> IndentExportBlock (PR #123493)

2025-01-18 Thread Owen Pan via cfe-commits
@@ -2687,7 +2687,7 @@ struct FormatStyle { ///} } /// \endcode /// \version 20 - bool ExportBlockIndentation; + bool IndentExportBlock; owenca wrote: Please keep the options sorted by moving it down to right after `IndentCa

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #123499)

2025-01-18 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/123499 Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Literal migration

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #123499)

2025-01-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Litera

[clang] [flang] [llvm] [IR] Convert from nocapture to captures(none) (PR #123181)

2025-01-18 Thread via cfe-commits
https://github.com/goldsteinn edited https://github.com/llvm/llvm-project/pull/123181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [IR] Convert from nocapture to captures(none) (PR #123181)

2025-01-18 Thread via cfe-commits
https://github.com/goldsteinn edited https://github.com/llvm/llvm-project/pull/123181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [IR] Convert from nocapture to captures(none) (PR #123181)

2025-01-18 Thread Nikita Popov via cfe-commits
@@ -8,14 +8,14 @@ typedef float v4sf __attribute__ ((__vector_size__ (16))); typedef double v4df __attribute__ ((__vector_size__ (32))); typedef int v4i32 __attribute__ ((__vector_size__ (16))); -// O32-LABEL: define{{.*}} void @test_v4sf(ptr dead_on_unwind noalias nocapture

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-01-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Prashanth (StarOne01) Changes This PR enhances the Clang diagnostics to provide better guidance when function-like macros are used without parentheses. Additionally, it updates the relevant test cases to reflect these changes (#123038 ).

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-01-18 Thread via cfe-commits
https://github.com/StarOne01 created https://github.com/llvm/llvm-project/pull/123495 This PR enhances the Clang diagnostics to provide better guidance when function-like macros are used without parentheses. Additionally, it updates the relevant test cases to reflect these changes (#123038 ).

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-18 Thread Tom Honermann via cfe-commits
@@ -0,0 +1,92 @@ +//===- StmtSYCL.h - Classes for SYCL kernel calls ---*- 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: Apa

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-18 Thread Tom Honermann via cfe-commits
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext { } }; +/// Represents a partial function definition. +/// +/// An outlined function declaration contains the parameters and body of +/// a function independent of other function definition concerns suc

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-18 Thread Tom Honermann via cfe-commits
@@ -451,9 +452,9 @@ class ASTDeclReader : public DeclVisitor { void VisitOMPDeclareMapperDecl(OMPDeclareMapperDecl *D); void VisitOMPRequiresDecl(OMPRequiresDecl *D); void VisitOMPCapturedExprDecl(OMPCapturedExprDecl *D); - }; tahonermann wrote: Committ

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-18 Thread Tom Honermann via cfe-commits
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext { } }; +/// Represents a partial function definition. +/// +/// An outlined function declaration contains the parameters and body of +/// a function independent of other function definition concerns suc

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-18 Thread Tom Honermann via cfe-commits
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext { } }; +/// Represents a partial function definition. +/// +/// An outlined function declaration contains the parameters and body of +/// a function independent of other function definition concerns suc

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-18 Thread Tom Honermann via cfe-commits
@@ -451,9 +452,9 @@ class ASTDeclReader : public DeclVisitor { void VisitOMPDeclareMapperDecl(OMPDeclareMapperDecl *D); void VisitOMPRequiresDecl(OMPRequiresDecl *D); void VisitOMPCapturedExprDecl(OMPCapturedExprDecl *D); - }; +}; - } // namespace clang --

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-18 Thread Tom Honermann via cfe-commits
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext { } }; +/// Represents a partial function definition. +/// +/// An outlined function declaration contains the parameters and body of +/// a function independent of other function definition concerns suc

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-18 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/122379 >From d021c2ba6a5b3f501b2f87317cb9072781069d73 Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Wed, 8 May 2024 14:31:36 -0700 Subject: [PATCH 1/4] [SYCL] AST support for SYCL kernel entry point functions.

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-18 Thread Tom Honermann via cfe-commits
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext { } }; +/// Represents a partial function definition. +/// +/// An outlined function declaration contains the parameters and body of +/// a function independent of other function definition concerns suc

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-18 Thread Tom Honermann via cfe-commits
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext { } }; +/// Represents a partial function definition. +/// +/// An outlined function declaration contains the parameters and body of +/// a function independent of other function definition concerns suc

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-18 Thread Tom Honermann via cfe-commits
@@ -4678,6 +4678,95 @@ class BlockDecl : public Decl, public DeclContext { } }; +/// Represents a partial function definition. +/// +/// An outlined function declaration contains the parameters and body of +/// a function independent of other function definition concerns suc

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-18 Thread Tom Honermann via cfe-commits
@@ -1376,6 +1377,16 @@ void ASTDeclWriter::VisitBlockDecl(BlockDecl *D) { Code = serialization::DECL_BLOCK; } +void ASTDeclWriter::VisitOutlinedFunctionDecl(OutlinedFunctionDecl *D) { + Record.push_back(D->getNumParams()); + VisitDecl(D); + Record.push_back(D->isNothrow()

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-18 Thread Tom Honermann via cfe-commits
@@ -0,0 +1,92 @@ +//===- StmtSYCL.h - Classes for SYCL kernel calls ---*- 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: Apa

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-18 Thread Tom Honermann via cfe-commits
tahonermann wrote: @erichkeane, thank you for the prior code review. I believe I've addressed all the concerns you raised. There are two conversations I left unresolved pending any further response from you. https://github.com/llvm/llvm-project/pull/122379 _

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-18 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann edited https://github.com/llvm/llvm-project/pull/122379 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [IR] Convert from nocapture to captures(none) (PR #123181)

2025-01-18 Thread via cfe-commits
@@ -8,14 +8,14 @@ typedef float v4sf __attribute__ ((__vector_size__ (16))); typedef double v4df __attribute__ ((__vector_size__ (32))); typedef int v4i32 __attribute__ ((__vector_size__ (16))); -// O32-LABEL: define{{.*}} void @test_v4sf(ptr dead_on_unwind noalias nocapture

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-18 Thread Owen Pan via cfe-commits
@@ -280,6 +281,13 @@ struct ParenState { /// was a newline after the beginning left paren. bool BreakBeforeClosingParen : 1; + /// Whether a newline needs to be inserted before the block's closing + /// angle < >. + /// + /// We only want to insert a newline before the

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-18 Thread Owen Pan via cfe-commits
@@ -1235,6 +1239,9 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State, Style.AlignAfterOpenBracket == FormatStyle::BAS_BlockIndent; } + if (PreviousNonComment && PreviousNonComment->is(tok::less)) +CurrentState.BreakBeforeClosingAngle = true;

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-18 Thread Owen Pan via cfe-commits
@@ -406,6 +406,10 @@ bool ContinuationIndenter::mustBreak(const LineState &State) { } if (CurrentState.BreakBeforeClosingParen && Current.is(tok::r_paren)) return true; + if (CurrentState.BreakBeforeClosingAngle && Current.is(TT_TemplateCloser) && + Style.BreakBe

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-18 Thread Owen Pan via cfe-commits
@@ -1371,6 +1378,11 @@ unsigned ContinuationIndenter::getNewLineColumn(const LineState &State) { State.Stack.size() > 1) { return State.Stack[State.Stack.size() - 2].LastSpace; } + if (Current.is(TT_TemplateCloser) && + Style.BreakBeforeTemplateCloser != Form

[clang] [Clang][Analysis] Don't treat the default switch path as unreachable when all enumerators are covered (PR #123166)

2025-01-18 Thread Jeremy Rifkin via cfe-commits
@@ -170,16 +170,14 @@ void test_nested_switch() { } } -// Test that if all the values of an enum covered, that the 'default' branch -// is unreachable. +// Test that a warning is not emitted if the code is unreachable. enum Values { A, B, C, D }; void test_all_enums_covere

[clang] [compiler-rt] [Clang] Make `-Wreturn-type` default to an error in all language modes (PR #123470)

2025-01-18 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/123470 >From 441385e14210f23a4fe5368d44620073a4347a31 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Sat, 18 Jan 2025 19:35:01 +0100 Subject: [PATCH 1/3] [Clang] Make -Wreturn-type default to an error in all language

[clang] [compiler-rt] [Clang] Make `-Wreturn-type` default to an error in all language modes (PR #123470)

2025-01-18 Thread via cfe-commits
Sirraide wrote: Ok, it ended up being only 3 compiler-rt tests that needed fixing. https://github.com/llvm/llvm-project/pull/123470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [fuchsia][cmake] Add runtimes for cortex-m4 for the Fuchsia toolchain (PR #123258)

2025-01-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64-aix` running on `aix-ppc64` while building `clang` at step 3 "clean-build-dir". Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/2012 Here is the relevant piece of the build log f

[clang] [clang-format] Rename ExportBlockIndentation -> IndentExportBlock (PR #123493)

2025-01-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: None (Sirraide) Changes This renames the `ExportBlockIndentation` option and adds a config parse test, as requested in #110381. --- Full diff: https://github.com/llvm/llvm-project/pull/123493.diff 7 Files Affected: - (modified)

[clang] [clang-format] Rename ExportBlockIndentation -> IndentExportBlock (PR #123493)

2025-01-18 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/123493 This renames the `ExportBlockIndentation` option and adds a config parse test, as requested in #110381. >From 6475c9dfc20901c03d4120b745fa6076502510f5 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Sun, 19 Jan

[clang] [llvm] Revert "[clang][DebugInfo] Emit DW_AT_object_pointer on function declarations with explicit `this`" (PR #123455)

2025-01-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-debuginfo Author: Michał Górny (mgorny) Changes Reverts llvm/llvm-project#122928 --- Full diff: https://github.com/llvm/llvm-project/pull/123455.diff 6 Files Affected: - (modified) clang/lib/CodeGen/CGDebugInfo.cpp

[clang] [ByteCode] Migrate away from PointerUnion::dyn_cast (NFC) (PR #123445)

2025-01-18 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/123445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #123444)

2025-01-18 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/123444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement the `reflect` HLSL function (PR #122992)

2025-01-18 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/122992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HIP] Support managed variables using the new driver (PR #123437)

2025-01-18 Thread Matt Arsenault via cfe-commits
@@ -1221,12 +1221,31 @@ void CGNVCUDARuntime::createOffloadingEntries() { ? static_cast(llvm::offloading::OffloadGlobalNormalized) : 0); if (I.Flags.getKind() == DeviceVarFlags::Variable) { - llvm::offloading::emitOffloadingEntry( - M

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-18 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/121417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-18 Thread via cfe-commits
https://github.com/cor3ntin commented: A few more comments on top of Richard's https://github.com/llvm/llvm-project/pull/121417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-18 Thread via cfe-commits
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, return New; } +// CheckBindingsCount +// - Checks the arity of the structured bindings +// - Creates the resolved pack expr if there is +//one +static bool CheckBindingsCount(Sema &S, D

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-18 Thread via cfe-commits
@@ -0,0 +1,117 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++26 %s -verify cor3ntin wrote: Can we - Test that `sizeof` (in the case where it's empty, of size 1, n, etc_) works fine - Test that `auto [a, b...]` works for an array of size 1 - Test that `auto [

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-18 Thread via cfe-commits
@@ -1099,6 +1099,13 @@ def err_lambda_capture_misplaced_ellipsis : Error< "the name of the capture">; def err_lambda_capture_multiple_ellipses : Error< "multiple ellipses in pack capture">; +def err_binding_multiple_ellipses : Error< + "multiple packs in structured binding

[clang] [Clang] Make `-Wreturn-type` default to an error. (PR #123464)

2025-01-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: None (Sirraide) Changes This makes `-Wreturn-type` default to an error as there is virtually no situation where you’d *want* to fall off the end of a function that is supposed to return a value. The actual change is just adding `D

[clang] [clang] Add __nullptr as a keyword to C (PR #123119)

2025-01-18 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/123119 >From 51372333df218cfb4fa8dcc0cebee03c0e3ebc5f Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 15 Jan 2025 15:24:12 -0500 Subject: [PATCH 1/4] __nullptr -> KEYALL, added relevant test --- clang/include/c

[clang] [Clang] Make `-Wreturn-type` default to an error. (PR #123464)

2025-01-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-systemz Author: None (Sirraide) Changes This makes `-Wreturn-type` default to an error as there is virtually no situation where you’d *want* to fall off the end of a function that is supposed to return a value. The actual change is just adding

[clang] [Clang] [NFC] Fix unintended `-Wreturn-type` warnings everywhere in the test suite (PR #123464)

2025-01-18 Thread via cfe-commits
Sirraide wrote: Update: thanks to @cor3ntin and some git black magic, I was able to remove the whitespace-only changes. https://github.com/llvm/llvm-project/pull/123464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang] Add __nullptr as a keyword to C (PR #123119)

2025-01-18 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/123119 >From 51372333df218cfb4fa8dcc0cebee03c0e3ebc5f Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 15 Jan 2025 15:24:12 -0500 Subject: [PATCH 1/3] __nullptr -> KEYALL, added relevant test --- clang/include/c

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-18 Thread Jason Rice via cfe-commits
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, return New; } +// CheckBindingsCount +// - Checks the arity of the structured bindings +// - Creates the resolved pack expr if there is +//one +static bool CheckBindingsCount(Sema &S, D

[clang] [clang] Added warn-assignment-bool-context (PR #115234)

2025-01-18 Thread Philipp Rados via cfe-commits
https://github.com/PhilippRados ready_for_review https://github.com/llvm/llvm-project/pull/115234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Fix unintended `-Wreturn-type` warnings everywhere in the test suite (PR #123464)

2025-01-18 Thread via cfe-commits
Sirraide wrote: > anything you can do to reduce white space only changes? Er, unless there is some way to do it w/ git that I’m not aware of it’d be pretty complicated for me because my IDE deletes trailing whitespace on save (and I’m pretty sure that’s true for a lot of other people too), so

[clang] [Clang] [NFC] Fix unintended `-Wreturn-type` warnings everywhere in the test suite (PR #123464)

2025-01-18 Thread via cfe-commits
Sirraide wrote: > How about > > * in this patch you modify the tests, and the test runner (hopefully lit > config can do that, I haven't checked) such that ~all tests (including new > ones) use -Werror=return-type (we might want to have tests where it's just a > warning to make sure this stil

[clang] [Clang] [NFC] Fix unintended `-Wreturn-type` warnings everywhere in the test suite (PR #123464)

2025-01-18 Thread via cfe-commits
@@ -300,7 +300,11 @@ int test_extract_template(MyMatrix Mat1) { using double4x4 = double __attribute__((matrix_type(4, 4))); template -auto matrix_subscript(double4x4 m, R r, C c) -> decltype(m[r][c]) {} +auto matrix_subscript(double4x4 m, R r, C c) -> decltype(m[r][c]) { +

[clang-tools-extra] [clangd] Reduce superfluous rename conflicts (PR #121515)

2025-01-18 Thread Ujan RoyBandyopadhyay via cfe-commits
ujan-r wrote: @llvm-beanz Could you take a look at this? https://github.com/llvm/llvm-project/pull/121515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Fix unintended `-Wreturn-type` warnings everywhere in the test suite (PR #123464)

2025-01-18 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/123464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Fix unintended `-Wreturn-type` warnings everywhere in the test suite (PR #123464)

2025-01-18 Thread via cfe-commits
Sirraide wrote: > It seems a bit ambitious to do this at the end of the cycle (no time to react > to feedback). Yeah, on the one hand, we could wait until after the branch before we make this change, but on the other hand, doing it now might result in more feedback as to how disruptive defaul

[clang] [clang] Added warn-assignment-bool-context (PR #115234)

2025-01-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Philipp Rados (PhilippRados) Changes This is a fix for #33528 as I messed up my other PR with unsynced changes. A couple of things make this less straightforward as initially thought, which is why I would like some feedback as to how the

[clang] [clang] Add __nullptr as a keyword to C (PR #123119)

2025-01-18 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/123119 >From 51372333df218cfb4fa8dcc0cebee03c0e3ebc5f Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 15 Jan 2025 15:24:12 -0500 Subject: [PATCH 1/5] __nullptr -> KEYALL, added relevant test --- clang/include/c

[clang] [Clang] [NFC] Fix unintended `-Wreturn-type` warnings everywhere in the test suite (PR #123464)

2025-01-18 Thread via cfe-commits
@@ -300,7 +300,11 @@ int test_extract_template(MyMatrix Mat1) { using double4x4 = double __attribute__((matrix_type(4, 4))); template -auto matrix_subscript(double4x4 m, R r, C c) -> decltype(m[r][c]) {} +auto matrix_subscript(double4x4 m, R r, C c) -> decltype(m[r][c]) { +

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-18 Thread via cfe-commits
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, return New; } +// CheckBindingsCount +// - Checks the arity of the structured bindings +// - Creates the resolved pack expr if there is +//one +static bool CheckBindingsCount(Sema &S, D

[clang] [AArch64][SVE] Fold svrev(svrev(v)) to v (PR #116422)

2025-01-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jorge Botto (jf-botto) Changes This PR follows the approach specified in https://github.com/llvm/llvm-project/issues/110444#issuecomment-2391540986 by making clang emit `llvm.vector.reverse` instead of `llvm.aarch64.sve.rev`, meaning ins

[clang] [AArch64][SVE] Fold svrev(svrev(v)) to v (PR #116422)

2025-01-18 Thread Jorge Botto via cfe-commits
https://github.com/jf-botto ready_for_review https://github.com/llvm/llvm-project/pull/116422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SVE] Fold svrev(svrev(v)) to v (PR #116422)

2025-01-18 Thread Jorge Botto via cfe-commits
https://github.com/jf-botto updated https://github.com/llvm/llvm-project/pull/116422 >From fdd0495d57ea7f59ba201b2b570d05d1ed144c99 Mon Sep 17 00:00:00 2001 From: Jorge Botto Date: Fri, 15 Nov 2024 18:56:54 + Subject: [PATCH] Making Clang emit llvm.vector.reverse instead of llvm.aarch64.sv

[clang] [AArch64][SVE] Fold svrev(svrev(v)) to v (PR #116422)

2025-01-18 Thread Jorge Botto via cfe-commits
jf-botto wrote: Sorry @MacDue, just wanted to check a few things before removing draft status. https://github.com/llvm/llvm-project/pull/116422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [AArch64][SVE] Fold svrev(svrev(v)) to v (PR #116422)

2025-01-18 Thread Jorge Botto via cfe-commits
jf-botto wrote: @sdesmalen-arm fyi https://github.com/llvm/llvm-project/pull/116422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] Patch series to reapply #118734 and substantially improve it (PR #120534)

2025-01-18 Thread Chandler Carruth via cfe-commits
chandlerc wrote: @dyung - OK, I think the current just-pushed version of this PR is worth another test. I've taught the TableGen string table emission to go back to working around the MSVC issues using a different table form that we used to use in LLVM when MSVC had a reliable error on it. It

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-18 Thread Petr Polezhaev via cfe-commits
https://github.com/petr-polezhaev edited https://github.com/llvm/llvm-project/pull/122606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-18 Thread Petr Polezhaev via cfe-commits
https://github.com/petr-polezhaev updated https://github.com/llvm/llvm-project/pull/122606 >From 0813476d626e21828f73e9f9a3a3561becd37277 Mon Sep 17 00:00:00 2001 From: Petr Polezhaev Date: Sat, 11 Jan 2025 21:21:16 +0300 Subject: [PATCH 1/3] [clangd] Support .clangd command line modifications

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-18 Thread Petr Polezhaev via cfe-commits
@@ -32,6 +32,9 @@ namespace { /// interfere with each other. class ModuleDependencyScanner { public: + using CommandProvider = petr-polezhaev wrote: In my original approach I just made the original CommandMangler (a struct) shared_ptr and passed it here. It

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-18 Thread Petr Polezhaev via cfe-commits
https://github.com/petr-polezhaev edited https://github.com/llvm/llvm-project/pull/122606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-18 Thread Petr Polezhaev via cfe-commits
@@ -32,9 +32,6 @@ namespace { /// interfere with each other. class ModuleDependencyScanner { public: - using CommandProvider = - llvm::unique_function; - petr-polezhaev wrote: Or `using CommandMangler = ProjectModules::CommandMangler`? https://github.co

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-18 Thread Petr Polezhaev via cfe-commits
@@ -833,8 +833,8 @@ bool OverlayCDB::setCompileCommand(PathRef File, std::unique_ptr OverlayCDB::getProjectModules(PathRef File) const { auto MDB = DelegatingCDB::getProjectModules(File); - MDB->setCommandProvider([&Mangler = Mangler](tooling::CompileCommand &Command, -

[clang] [StrTable] Mechanically convert Hexagon builtins to use TableGen (PR #123460)

2025-01-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-hexagon Author: Chandler Carruth (chandlerc) Changes This switches them to use the common builtin TableGen emission. The fancy feature string preprocessor tricks are replaced with a fairly direct translation into TableGen. All of the actual de

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #117437)

2025-01-18 Thread via cfe-commits
yronglin wrote: friendly ping~ https://github.com/llvm/llvm-project/pull/117437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Fix unintended `-Wreturn-type` warnings everywhere in the test suite (PR #123464)

2025-01-18 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/123464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Fix unintended `-Wreturn-type` warnings everywhere in the test suite (PR #123464)

2025-01-18 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/123464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-01-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: please update documents https://github.com/llvm/llvm-project/pull/123413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-18 Thread via cfe-commits
@@ -8469,7 +8489,7 @@ void Sema::CheckInfNaNFunction(const CallExpr *Call, bool IsInfOrIsFinite = cor3ntin wrote: As an aside, this is called on every function call, which seems widely inficient. can we do something like ```cpp FPOptions FPO = Call->getFPF

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-01-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/123413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Added warn-assignment-bool-context (PR #115234)

2025-01-18 Thread Philipp Rados via cfe-commits
PhilippRados wrote: No problem, I know everybody is busy. > The first step is to get the PR out of draft state. Do you just mean to mark it "read for review" or to apply changes so that it can be merged? Because the current implementation is not ready as I still have some questions as to how t

[clang] [llvm] [HIP] Support managed variables using the new driver (PR #123437)

2025-01-18 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/123437 >From bed6550941c0fafe2975288e49957a5a36895cf2 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 17 Jan 2025 19:56:18 -0600 Subject: [PATCH 1/2] [HIP] Support managed variables using the new driver Summary

[clang] [Clang] [NFC] Fix unintended `-Wreturn-type` warnings everywhere in the test suite (PR #123464)

2025-01-18 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/123464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Make `-Wreturn-type` default to an error. (PR #123464)

2025-01-18 Thread via cfe-commits
https://github.com/cor3ntin commented: Thanks a lot for working on this. It seems a bit ambitious to do this at the end of the cycle (no time to react to feedback). However, we might want to take what is offered and minimize churn. How about - in this patch you modify the tests, and the test

[clang] [clang] Added warn-assignment-bool-context (PR #115234)

2025-01-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > No problem, I know everybody is busy. > > > The first step is to get the PR out of draft state. > > Do you just mean to mark it "read for review" or to apply changes so that it > can be merged? Because the current implementation is not ready as I still > have some questions a

  1   2   >