https://github.com/jasilvanus closed
https://github.com/llvm/llvm-project/pull/89228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/89228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request.
I don't see a use case for that comment, and thus I see no problem in removing
it.
https://github.com/llvm/llvm-project/pull/89228
___
cfe-commits mailing list
cfe-commits@lists.llvm.or
mydeveloperday wrote:
I'm ok with removing it if @owenca and @HazardyKnusperkeks are.
https://github.com/llvm/llvm-project/pull/89228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits {
FormatStyle PredefinedStyle;
if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) &&
Style == PredefinedStyle) {
- IO.mapOptional("# BasedOnStyle", StyleName);
-
jasilvanus wrote:
I've removed the dummy field and the comment now. This should prevent confusion.
I don't know whether anyone actually uses the emitted comment, there is no
explanation,
and tests pass without it.
I suggest that if we later learn that there are valid uses that require the
comm
@@ -807,12 +807,18 @@ template <> struct MappingTraits {
FormatStyle PredefinedStyle;
if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) &&
Style == PredefinedStyle) {
- IO.mapOptional("# BasedOnStyle", StyleName);
+
https://github.com/jasilvanus updated
https://github.com/llvm/llvm-project/pull/89228
>From 5d4a3b0f922b0c28960f610c695c92da7d3538c1 Mon Sep 17 00:00:00 2001
From: Jannik Silvanus
Date: Thu, 18 Apr 2024 14:56:47 +0200
Subject: [PATCH 1/2] [clang-format] Remove YAML hack to emit a BasedOnStyle
https://github.com/HazardyKnusperkeks edited
https://github.com/llvm/llvm-project/pull/89228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HazardyKnusperkeks commented:
The question is, is there any real benefit of putting the commented style in
the output?
https://github.com/llvm/llvm-project/pull/89228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://l
@@ -807,12 +807,18 @@ template <> struct MappingTraits {
FormatStyle PredefinedStyle;
if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) &&
Style == PredefinedStyle) {
- IO.mapOptional("# BasedOnStyle", StyleName);
-
@@ -807,12 +807,18 @@ template <> struct MappingTraits {
FormatStyle PredefinedStyle;
if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) &&
Style == PredefinedStyle) {
- IO.mapOptional("# BasedOnStyle", StyleName);
+
@@ -807,12 +807,18 @@ template <> struct MappingTraits {
FormatStyle PredefinedStyle;
if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) &&
Style == PredefinedStyle) {
- IO.mapOptional("# BasedOnStyle", StyleName);
-
jasilvanus wrote:
> This doesn't feel correct to me...
I'd also be fine with just removing the comment.
https://github.com/llvm/llvm-project/pull/89228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
@@ -807,12 +807,18 @@ template <> struct MappingTraits {
FormatStyle PredefinedStyle;
if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) &&
Style == PredefinedStyle) {
- IO.mapOptional("# BasedOnStyle", StyleName);
+
@@ -807,12 +807,18 @@ template <> struct MappingTraits {
FormatStyle PredefinedStyle;
if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) &&
Style == PredefinedStyle) {
- IO.mapOptional("# BasedOnStyle", StyleName);
+
@@ -807,12 +807,18 @@ template <> struct MappingTraits {
FormatStyle PredefinedStyle;
if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) &&
Style == PredefinedStyle) {
- IO.mapOptional("# BasedOnStyle", StyleName);
+
@@ -807,12 +807,18 @@ template <> struct MappingTraits {
FormatStyle PredefinedStyle;
if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) &&
Style == PredefinedStyle) {
- IO.mapOptional("# BasedOnStyle", StyleName);
-
https://github.com/mydeveloperday requested changes to this pull request.
This doesn't feel correct to me...
https://github.com/llvm/llvm-project/pull/89228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
https://github.com/mydeveloperday edited
https://github.com/llvm/llvm-project/pull/89228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang-format
Author: Jannik Silvanus (jasilvanus)
Changes
When serializing a formatting style to YAML, we were emitting a comment `#
BasedOnStyle: