This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG95c1a17433b9: [clang-format] add config parse test for short lambda (authored by Backl1ght).
Changed prior to commit: https://reviews.llvm.org/D140105?vs=483170&id=483503#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140105/new/ https://reviews.llvm.org/D140105 Files: clang/unittests/Format/ConfigParseTest.cpp Index: clang/unittests/Format/ConfigParseTest.cpp =================================================================== --- clang/unittests/Format/ConfigParseTest.cpp +++ clang/unittests/Format/ConfigParseTest.cpp @@ -533,6 +533,21 @@ CHECK_PARSE("AllowShortFunctionsOnASingleLine: true", AllowShortFunctionsOnASingleLine, FormatStyle::SFS_All); + Style.AllowShortLambdasOnASingleLine = FormatStyle::SLS_All; + CHECK_PARSE("AllowShortLambdasOnASingleLine: None", + AllowShortLambdasOnASingleLine, FormatStyle::SLS_None); + CHECK_PARSE("AllowShortLambdasOnASingleLine: Empty", + AllowShortLambdasOnASingleLine, FormatStyle::SLS_Empty); + CHECK_PARSE("AllowShortLambdasOnASingleLine: Inline", + AllowShortLambdasOnASingleLine, FormatStyle::SLS_Inline); + CHECK_PARSE("AllowShortLambdasOnASingleLine: All", + AllowShortLambdasOnASingleLine, FormatStyle::SLS_All); + // For backward compatibility: + CHECK_PARSE("AllowShortLambdasOnASingleLine: false", + AllowShortLambdasOnASingleLine, FormatStyle::SLS_None); + CHECK_PARSE("AllowShortLambdasOnASingleLine: true", + AllowShortLambdasOnASingleLine, FormatStyle::SLS_All); + Style.SpaceAroundPointerQualifiers = FormatStyle::SAPQ_Both; CHECK_PARSE("SpaceAroundPointerQualifiers: Default", SpaceAroundPointerQualifiers, FormatStyle::SAPQ_Default);
Index: clang/unittests/Format/ConfigParseTest.cpp =================================================================== --- clang/unittests/Format/ConfigParseTest.cpp +++ clang/unittests/Format/ConfigParseTest.cpp @@ -533,6 +533,21 @@ CHECK_PARSE("AllowShortFunctionsOnASingleLine: true", AllowShortFunctionsOnASingleLine, FormatStyle::SFS_All); + Style.AllowShortLambdasOnASingleLine = FormatStyle::SLS_All; + CHECK_PARSE("AllowShortLambdasOnASingleLine: None", + AllowShortLambdasOnASingleLine, FormatStyle::SLS_None); + CHECK_PARSE("AllowShortLambdasOnASingleLine: Empty", + AllowShortLambdasOnASingleLine, FormatStyle::SLS_Empty); + CHECK_PARSE("AllowShortLambdasOnASingleLine: Inline", + AllowShortLambdasOnASingleLine, FormatStyle::SLS_Inline); + CHECK_PARSE("AllowShortLambdasOnASingleLine: All", + AllowShortLambdasOnASingleLine, FormatStyle::SLS_All); + // For backward compatibility: + CHECK_PARSE("AllowShortLambdasOnASingleLine: false", + AllowShortLambdasOnASingleLine, FormatStyle::SLS_None); + CHECK_PARSE("AllowShortLambdasOnASingleLine: true", + AllowShortLambdasOnASingleLine, FormatStyle::SLS_All); + Style.SpaceAroundPointerQualifiers = FormatStyle::SAPQ_Both; CHECK_PARSE("SpaceAroundPointerQualifiers: Default", SpaceAroundPointerQualifiers, FormatStyle::SAPQ_Default);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits