Skip to content

Commit

Permalink
[clang-format] Fix AllowAllConstructorInitializersOnNextLine value
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
owenca committed Aug 27, 2021
1 parent 56e372b commit 170a3c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Format/Format.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 170a3c6

Please sign in to comment.