[clang] 170a3c6 - [clang-format] Fix AllowAllConstructorInitializersOnNextLine value
via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 27 14:48:22 PDT 2021
Author: owenca
Date: 2021-08-27T14:47:49-07:00
New Revision: 170a3c6f7a0599707d8ea5cfb1bc4252920edef7
URL: https://github.com/llvm/llvm-project/commit/170a3c6f7a0599707d8ea5cfb1bc4252920edef7
DIFF: https://github.com/llvm/llvm-project/commit/170a3c6f7a0599707d8ea5cfb1bc4252920edef7.diff
LOG: [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.
Added:
Modified:
clang/lib/Format/Format.cpp
Removed:
################################################################################
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<FormatStyle> {
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);
More information about the cfe-commits
mailing list