[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
@@ -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-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] [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] [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] [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
@@ -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
@@ -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
@@ -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] [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] [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] [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
@@ -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
@@ -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
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
@@ -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
@@ -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); - }; +}; - } // namespace clang --

[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] [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-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] [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] [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] [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] 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] [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] [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] [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] 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] [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] [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] [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][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][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] [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] [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] 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] [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] [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] [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] [llvm] Add the initializes attribute inference (PR #117104)

2025-01-18 Thread Florian Hahn via cfe-commits
fhahn wrote: > Looks like this is causing a crash when building with sanitizers enabled on > macOS > > Reduced reproducer: https://llvm.godbolt.org/z/fn83n4oz4 > > End-to-end crash on GreenDragon: > https://green.lab.llvm.org/job/llvm.org/job/clang-stage2-cmake-RgSan/664/console Looked like

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

2025-01-18 Thread Björn Schäpers via cfe-commits
@@ -310,7 +310,7 @@ C++23 Feature Support - Extend lifetime of temporaries in mem-default-init for P2718R0. Clang now fully supports `P2718R0 Lifetime extension in range-based for loops `_. - + HazardyKnusperkeks wrote: Remove

[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
@@ -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] [CMake] Add a cache file for building a highly-optimized LLVM toolchain (PR #117802)

2025-01-18 Thread Tom Stellard via cfe-commits
tstellar wrote: > These cache files seem to be largely the same as > [PGO.cmake](https://github.com/llvm/llvm-project/blob/4cec0ba92955c353c52efe728b2cfef3fbdf60f8/clang/cmake/caches/PGO.cmake), > > [PGO-stage2.cmake](https://github.com/llvm/llvm-project/blob/04b002bbb838bc502bd6d5f602af95efd6

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

2025-01-18 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > LGTM with nits Thank you, I addressed the nits https://github.com/llvm/llvm-project/pull/123417 ___ 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 Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/123417 >From 51dd53feb7a35d4fac648dd165fb5b99f73c6c24 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 17 Jan 2025 23:32:48 +0100 Subject: [PATCH 1/4] [Clang] Fix invalid use of infinity warning --- clang/

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

2025-01-18 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/123417 ___ 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
@@ -8454,26 +8454,47 @@ static bool IsInfOrNanFunction(StringRef calleeName, MathCheck Check) { llvm_unreachable("unknown MathCheck"); } +static bool IsInfinityFunction(const FunctionDecl *FDecl) { + if (FDecl->getName() != "infinity") { +return false; + } + + if (co

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

2025-01-18 Thread via cfe-commits
@@ -8454,26 +8454,47 @@ static bool IsInfOrNanFunction(StringRef calleeName, MathCheck Check) { llvm_unreachable("unknown MathCheck"); } +static bool IsInfinityFunction(const FunctionDecl *FDecl) { + if (FDecl->getName() != "infinity") { +return false; + } + + if (co

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

2025-01-18 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM with nits https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-01-18 Thread Björn Schäpers via cfe-commits
@@ -28430,6 +28430,26 @@ TEST_F(FormatTest, ShortNamespacesOption) { "}}} // namespace foo::bar::baz", "namespace foo { namespace bar { namespace baz { class qux; } } }", Style); + Style.FixNamespaceComments = false; + + Style.BreakBeforeBraces = FormatStyle

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-01-18 Thread Björn Schäpers via cfe-commits
@@ -28430,6 +28430,26 @@ TEST_F(FormatTest, ShortNamespacesOption) { "}}} // namespace foo::bar::baz", "namespace foo { namespace bar { namespace baz { class qux; } } }", Style); + Style.FixNamespaceComments = false; + + Style.BreakBeforeBraces = FormatStyle

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

2025-01-18 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > Can you add a changelog entry? Thanks Done, thanks https://github.com/llvm/llvm-project/pull/123417 ___ 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 Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/123417 >From 51dd53feb7a35d4fac648dd165fb5b99f73c6c24 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 17 Jan 2025 23:32:48 +0100 Subject: [PATCH 1/3] [Clang] Fix invalid use of infinity warning --- clang/

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

2025-01-18 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks edited 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 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-format] Add an option to control indentation of `export { ... }` (PR #110381)

2025-01-18 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks commented: Apart from that LGTM. 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] [clang-format] Add an option to control indentation of `export { ... }` (PR #110381)

2025-01-18 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. 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] [clang-format] Add an option to control indentation of `export { ... }` (PR #110381)

2025-01-18 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/110381 >From 570aff7459311a43cd9c9139de05dc2ab4cf762c Mon Sep 17 00:00:00 2001 From: Sirraide Date: Sat, 28 Sep 2024 20:36:38 +0200 Subject: [PATCH 1/6] [clang-format] Add an option to control indentation of `export

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

2025-01-18 Thread via cfe-commits
@@ -171,6 +171,8 @@ class UnwrappedLineParser { void parseRequiresClause(FormatToken *RequiresToken); void parseRequiresExpression(FormatToken *RequiresToken); void parseConstraintExpression(); + void parseCXXExportBlock(); Sirraide wrote: Ah sure; I’m

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

2025-01-18 Thread via cfe-commits
https://github.com/cor3ntin commented: Can you add a changelog entry? Thanks https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-18 Thread Björn Schäpers via cfe-commits
@@ -171,6 +171,8 @@ class UnwrappedLineParser { void parseRequiresClause(FormatToken *RequiresToken); void parseRequiresExpression(FormatToken *RequiresToken); void parseConstraintExpression(); + void parseCXXExportBlock(); HazardyKnusperkeks wrote: ```

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

2025-01-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes This makes `-Wreturn-type` default to an error in all language modes as there is basically never a reason as to why one would *want* to fall off the end of a non-void function. Most of the tedious work of migratin

[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 created https://github.com/llvm/llvm-project/pull/123470 This makes `-Wreturn-type` default to an error in all language modes as there is basically never a reason as to why one would *want* to fall off the end of a non-void function. Most of the tedious work of mig

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

2025-01-18 Thread Amr Hesham via cfe-commits
@@ -8469,7 +8489,7 @@ void Sema::CheckInfNaNFunction(const CallExpr *Call, bool IsInfOrIsFinite = AmrDeveloper wrote: I think it's better now, early return if there is no identifier and check `NoHonor.. `first before checking for function name https://gith

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

2025-01-18 Thread Jason Rice 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] [NFC] Fix unintended `-Wreturn-type` warnings everywhere in the test suite (PR #123464)

2025-01-18 Thread via cfe-commits
https://github.com/Sirraide closed 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] [llvm] [clang][DebugInfo] Emit DW_AT_object_pointer on function declarations with explicit `this` (PR #122928)

2025-01-18 Thread Michael Buch via cfe-commits
Michael137 wrote: @mgorny thanks for the ping. I relanded in https://github.com/llvm/llvm-project/commit/a5fb2bbb2ad8488482843e2298fbe6f6a1d45bbd. Confirmed that the OCaml bindings build and tests pass. https://github.com/llvm/llvm-project/pull/122928 __

[clang] a5fb2bb - Reapply "[clang][DebugInfo] Emit DW_AT_object_pointer on function declarations with explicit `this`" (#123455)

2025-01-18 Thread Michael Buch via cfe-commits
Author: Michael Buch Date: 2025-01-18T18:03:41Z New Revision: a5fb2bbb2ad8488482843e2298fbe6f6a1d45bbd URL: https://github.com/llvm/llvm-project/commit/a5fb2bbb2ad8488482843e2298fbe6f6a1d45bbd DIFF: https://github.com/llvm/llvm-project/commit/a5fb2bbb2ad8488482843e2298fbe6f6a1d45bbd.diff LOG:

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

2025-01-18 Thread Philipp Rados via cfe-commits
PhilippRados wrote: Yup ok. I thought that was what draft was for to check on not-finished implementations but I just changed it back for review. https://github.com/llvm/llvm-project/pull/115234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2025-01-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/123417 >From 51dd53feb7a35d4fac648dd165fb5b99f73c6c24 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 17 Jan 2025 23:32:48 +0100 Subject: [PATCH 1/2] [Clang] Fix invalid use of infinity warning --- clang/

[clang] 80e0cba - [ByteCode] Migrate away from PointerUnion::dyn_cast (NFC) (#123445)

2025-01-18 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-18T09:43:17-08:00 New Revision: 80e0cbafba56d428571f4e05e5dfe305b85b809a URL: https://github.com/llvm/llvm-project/commit/80e0cbafba56d428571f4e05e5dfe305b85b809a DIFF: https://github.com/llvm/llvm-project/commit/80e0cbafba56d428571f4e05e5dfe305b85b809a.diff L

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

2025-01-18 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed 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] 02a56c4 - [AST] Migrate away from PointerUnion::dyn_cast (NFC) (#123444)

2025-01-18 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-18T09:42:55-08:00 New Revision: 02a56c4d01c1621846d7342982d62468e45cede0 URL: https://github.com/llvm/llvm-project/commit/02a56c4d01c1621846d7342982d62468e45cede0 DIFF: https://github.com/llvm/llvm-project/commit/02a56c4d01c1621846d7342982d62468e45cede0.diff L

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

2025-01-18 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed 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] [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 approved this pull request. Looks reasonable. anything you can do to reduce white space only changes? https://github.com/llvm/llvm-project/pull/123464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[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

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

2025-01-18 Thread Amr Hesham via cfe-commits
@@ -8469,7 +8489,7 @@ void Sema::CheckInfNaNFunction(const CallExpr *Call, bool IsInfOrIsFinite = AmrDeveloper wrote: Yes, I agree, i am thinking to change the structure of the function `CheckInfNaNFunction ` too, because if `HasIdentifier` is false that's

[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] [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] [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] 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][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: > 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] [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

  1   2   >