forked from OSchip/llvm-project
Handle 'Cpp03' and 'Cpp11' strings in LanguageStandard serialization for
consistency of serialized form with the actual enum member names without a prefix. llvm-svn: 189936
This commit is contained in:
parent
d4885daefa
commit
b40cfe4866
|
@ -36,7 +36,9 @@ template <>
|
|||
struct ScalarEnumerationTraits<clang::format::FormatStyle::LanguageStandard> {
|
||||
static void enumeration(IO &IO,
|
||||
clang::format::FormatStyle::LanguageStandard &Value) {
|
||||
IO.enumCase(Value, "Cpp03", clang::format::FormatStyle::LS_Cpp03);
|
||||
IO.enumCase(Value, "C++03", clang::format::FormatStyle::LS_Cpp03);
|
||||
IO.enumCase(Value, "Cpp11", clang::format::FormatStyle::LS_Cpp11);
|
||||
IO.enumCase(Value, "C++11", clang::format::FormatStyle::LS_Cpp11);
|
||||
IO.enumCase(Value, "Auto", clang::format::FormatStyle::LS_Auto);
|
||||
}
|
||||
|
|
|
@ -6001,6 +6001,8 @@ TEST_F(FormatTest, ParsesConfiguration) {
|
|||
CHECK_PARSE("IndentWidth: 32", IndentWidth, 32u);
|
||||
|
||||
Style.Standard = FormatStyle::LS_Auto;
|
||||
CHECK_PARSE("Standard: Cpp03", Standard, FormatStyle::LS_Cpp03);
|
||||
CHECK_PARSE("Standard: Cpp11", Standard, FormatStyle::LS_Cpp11);
|
||||
CHECK_PARSE("Standard: C++03", Standard, FormatStyle::LS_Cpp03);
|
||||
CHECK_PARSE("Standard: C++11", Standard, FormatStyle::LS_Cpp11);
|
||||
CHECK_PARSE("Standard: Auto", Standard, FormatStyle::LS_Auto);
|
||||
|
|
Loading…
Reference in New Issue