From 170a3c6f7a0599707d8ea5cfb1bc4252920edef7 Mon Sep 17 00:00:00 2001 From: owenca Date: Fri, 27 Aug 2021 14:32:30 -0700 Subject: [PATCH] [clang-format] Fix AllowAllConstructorInitializersOnNextLine value The default value of the now deprecated AllowAllConstructorInitializersOnNextLine was always true regardless of the value of BasedOnStyle. This patch fixes the typo in the code that handles the related backward compatibility. --- clang/lib/Format/Format.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 08e8e9e866949..78a92aa542000 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -664,7 +664,7 @@ template <> struct MappingTraits { const bool IsGoogleOrChromium = BasedOn.equals_insensitive("google") || BasedOn.equals_insensitive("chromium"); bool OnCurrentLine = IsGoogleOrChromium; - bool OnNextLine = IsGoogleOrChromium; + bool OnNextLine = true; IO.mapOptional("ConstructorInitializerAllOnOneLineOrOnePerLine", OnCurrentLine); IO.mapOptional("AllowAllConstructorInitializersOnNextLine", OnNextLine);