[NFC] Avoid repeatedly instantiating std::function

This commit is contained in:
Brent Royal-Gordon
2020-09-01 12:54:01 -07:00
parent 9057123739
commit dd726a0015
4 changed files with 45 additions and 18 deletions

View File

@@ -380,10 +380,13 @@ struct PrintOptions {
/// has no associated doc-comment by itself.
bool CascadeDocComment = false;
static const std::function<bool(const ExtensionDecl *)>
defaultPrintExtensionContentAsMembers;
/// Whether to print the content of an extension decl inside the type decl where it
/// extends from.
std::function<bool(const ExtensionDecl *)> printExtensionContentAsMembers =
[] (const ExtensionDecl *) { return false; };
PrintOptions::defaultPrintExtensionContentAsMembers;
/// How to print the keyword argument and parameter name in functions.
ArgAndParamPrintingMode ArgAndParamPrinting =