[clang] [clang-format] Google Style: disable DerivePointerAlignment. (PR #149602)

2025-07-21 Thread Owen Pan via cfe-commits
owenca wrote: > > Can you add a link to the relevant section of the style guide? > > The new policy is not yet published, but I added a link to the section which > will be changed. This patch looks good now, but IMO we should wait until the new style is published. https://github.com/llvm/llv

[clang] [clang-format] Google Style: disable DerivePointerAlignment. (PR #149602)

2025-07-21 Thread James Y Knight via cfe-commits
@@ -12287,6 +12287,7 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { ", *a);"); verifyGoogleFormat("int const* a = &b;"); + verifyFormat("int const* a = &b;", "int const *a = &b;", getGoogleStyle()); ---

[clang] [clang-format] Google Style: disable DerivePointerAlignment. (PR #149602)

2025-07-21 Thread James Y Knight via cfe-commits
@@ -12891,27 +12892,30 @@ TEST_F(FormatTest, UnderstandsEllipsis) { } TEST_F(FormatTest, AdaptivelyFormatsPointersAndReferences) { + FormatStyle Style = getLLVMStyle(); jyknight wrote: Done https://github.com/llvm/llvm-project/pull/149602 __

[clang] [clang-format] Google Style: disable DerivePointerAlignment. (PR #149602)

2025-07-21 Thread James Y Knight via cfe-commits
@@ -1753,7 +1753,7 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) { GoogleStyle.AttributeMacros.push_back("absl_nullable"); GoogleStyle.AttributeMacros.push_back("absl_nullability_unknown"); GoogleStyle.BreakTemplateDeclarations = FormatStyle::BTDS_Yes

[clang] [clang-format] Google Style: disable DerivePointerAlignment. (PR #149602)

2025-07-21 Thread James Y Knight via cfe-commits
https://github.com/jyknight updated https://github.com/llvm/llvm-project/pull/149602 >From 296b9b160564882e209544ed7a2db0adc62d3246 Mon Sep 17 00:00:00 2001 From: James Y Knight Date: Fri, 18 Jul 2025 17:44:38 -0400 Subject: [PATCH 1/2] [clang-format] Google Style: disable DerivePointerAlignme

[clang] [clang-format] Google Style: disable DerivePointerAlignment. (PR #149602)

2025-07-21 Thread James Y Knight via cfe-commits
jyknight wrote: > Can you add a link to the relevant section of the style guide? The new policy is not yet published, but I added a link to the section which will be changed. > What about other languages? So far as I know, this control is not relevant for languages other than C/C++/ObjC/ObjC

[clang] [clang-format] Google Style: disable DerivePointerAlignment. (PR #149602)

2025-07-19 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/149602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Google Style: disable DerivePointerAlignment. (PR #149602)

2025-07-19 Thread James Y Knight via cfe-commits
https://github.com/jyknight edited https://github.com/llvm/llvm-project/pull/149602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Google Style: disable DerivePointerAlignment. (PR #149602)

2025-07-18 Thread Owen Pan via cfe-commits
@@ -12287,6 +12287,7 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { ", *a);"); verifyGoogleFormat("int const* a = &b;"); + verifyFormat("int const* a = &b;", "int const *a = &b;", getGoogleStyle()); ---

[clang] [clang-format] Google Style: disable DerivePointerAlignment. (PR #149602)

2025-07-18 Thread Owen Pan via cfe-commits
@@ -1753,7 +1753,7 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) { GoogleStyle.AttributeMacros.push_back("absl_nullable"); GoogleStyle.AttributeMacros.push_back("absl_nullability_unknown"); GoogleStyle.BreakTemplateDeclarations = FormatStyle::BTDS_Yes

[clang] [clang-format] Google Style: disable DerivePointerAlignment. (PR #149602)

2025-07-18 Thread Owen Pan via cfe-commits
@@ -12891,27 +12892,30 @@ TEST_F(FormatTest, UnderstandsEllipsis) { } TEST_F(FormatTest, AdaptivelyFormatsPointersAndReferences) { + FormatStyle Style = getLLVMStyle(); owenca wrote: ```suggestion auto Style = getGoogleStyle(); ASSERT_FALSE(Style.DeriveP