diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -593,9 +593,11 @@ template <> struct ScalarEnumerationTraits { static void enumeration(IO &IO, FormatStyle::ShortWhileForLoopStyle &Value) { IO.enumCase(Value, "Never", FormatStyle::SWFLS_Never); - IO.enumCase(Value, "false", FormatStyle::SWFLS_Never); IO.enumCase(Value, "NonEmpty", FormatStyle::SWFLS_NonEmpty); IO.enumCase(Value, "All", FormatStyle::SWFLS_All); + + // For backward compatibility. + IO.enumCase(Value, "false", FormatStyle::SWFLS_Never); IO.enumCase(Value, "true", FormatStyle::SWFLS_NonEmpty); } };