Backl1ght created this revision. Backl1ght added a project: clang-format. Herald added a project: All. Backl1ght requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
Repository: rG LLVM Github Monorepo 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,20 @@ 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); + 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,20 @@ 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); + 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