[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-25 Thread Jannik Silvanus via cfe-commits
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

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-24 Thread Owen Pan via 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

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-23 Thread Björn Schäpers via 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

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-23 Thread via cfe-commits
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

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-23 Thread Jannik Silvanus via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, ) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName);

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-23 Thread Jannik Silvanus via cfe-commits
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

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-23 Thread Jannik Silvanus via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, ) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName); + // For

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-23 Thread Jannik Silvanus via cfe-commits
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

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-22 Thread Björn Schäpers via cfe-commits
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

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-22 Thread Björn Schäpers via 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

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-22 Thread Björn Schäpers via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, ) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName);

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-22 Thread Björn Schäpers via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, ) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName); + // For

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread Jannik Silvanus via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, ) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName);

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread Jannik Silvanus via cfe-commits
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

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread Jannik Silvanus via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, ) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName); + // For

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, ) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName); + // For

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, ) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName); + // For

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, ) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName);

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread via cfe-commits
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

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread via cfe-commits
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

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-18 Thread via 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: style` if the serialized formatting style matches one of the known styles. This is useful, but mis-uses

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-18 Thread Jannik Silvanus via cfe-commits
https://github.com/jasilvanus created https://github.com/llvm/llvm-project/pull/89228 When serializing a formatting style to YAML, we were emitting a comment `# BasedOnStyle: