[PATCH] clang-format: Add missing members to FormatStyle::operator==

David Blaikie dblaikie at gmail.com
Sat Jun 27 08:42:13 PDT 2015


can/should there be any test coverage for this? (I suppose there's probably
not any test coverage that would catch added fields without using UB to
scramble the object's bits... )

On Fri, Jun 26, 2015 at 4:40 PM, Birunthan Mohanathas <
birunthan at mohanathas.com> wrote:

> Hi djasper,
>
> Depends on D10784.
>
> http://reviews.llvm.org/D10785
>
> Files:
>   include/clang/Format/Format.h
>
> Index: include/clang/Format/Format.h
> ===================================================================
> --- include/clang/Format/Format.h
> +++ include/clang/Format/Format.h
> @@ -427,12 +427,15 @@
>    bool operator==(const FormatStyle &R) const {
>      return AccessModifierOffset == R.AccessModifierOffset &&
>             AlignAfterOpenBracket == R.AlignAfterOpenBracket &&
> +           AlignConsecutiveAssignments == R.AlignConsecutiveAssignments &&
>             AlignEscapedNewlinesLeft == R.AlignEscapedNewlinesLeft &&
>             AlignOperands == R.AlignOperands &&
>             AlignTrailingComments == R.AlignTrailingComments &&
>             AllowAllParametersOfDeclarationOnNextLine ==
>                 R.AllowAllParametersOfDeclarationOnNextLine &&
>             AllowShortBlocksOnASingleLine ==
> R.AllowShortBlocksOnASingleLine &&
> +           AllowShortCaseLabelsOnASingleLine ==
> +               R.AllowShortCaseLabelsOnASingleLine &&
>             AllowShortFunctionsOnASingleLine ==
>                 R.AllowShortFunctionsOnASingleLine &&
>             AllowShortIfStatementsOnASingleLine ==
> @@ -460,6 +463,7 @@
>             ContinuationIndentWidth == R.ContinuationIndentWidth &&
>             Cpp11BracedListStyle == R.Cpp11BracedListStyle &&
>             DerivePointerAlignment == R.DerivePointerAlignment &&
> +           DisableFormat == R.DisableFormat &&
>             ExperimentalAutoDetectBinPacking ==
>                 R.ExperimentalAutoDetectBinPacking &&
>             ForEachMacros == R.ForEachMacros &&
> @@ -473,6 +477,8 @@
>             ObjCBlockIndentWidth == R.ObjCBlockIndentWidth &&
>             ObjCSpaceAfterProperty == R.ObjCSpaceAfterProperty &&
>             ObjCSpaceBeforeProtocolList == R.ObjCSpaceBeforeProtocolList &&
> +           PenaltyBreakBeforeFirstCallParameter ==
> +               R.PenaltyBreakBeforeFirstCallParameter &&
>             PenaltyBreakComment == R.PenaltyBreakComment &&
>             PenaltyBreakFirstLessLess == R.PenaltyBreakFirstLessLess &&
>             PenaltyBreakString == R.PenaltyBreakString &&
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150627/e6d25e9e/attachment.html>


More information about the cfe-commits mailing list