MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / WrapInParensOrCurlys

Method WrapInParensOrCurlys

CodeGenerator.cpp:5152–5173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5150//-----------------------------------------------------------------------------
5151
5152void CodeGenerator::WrapInParensOrCurlys(const BraceKind braceKind,
5153 void_func_ref lambda,
5154 const AddSpaceAtTheEnd addSpaceAtTheEnd)
5155{
5156 if(BraceKind::Curlys == braceKind) {
5157 mOutputFormatHelper.Append('{');
5158 } else {
5159 mOutputFormatHelper.Append('(');
5160 }
5161
5162 lambda();
5163
5164 if(BraceKind::Curlys == braceKind) {
5165 mOutputFormatHelper.Append('}');
5166 } else {
5167 mOutputFormatHelper.Append(')');
5168 }
5169
5170 if(AddSpaceAtTheEnd::Yes == addSpaceAtTheEnd) {
5171 mOutputFormatHelper.Append(' ');
5172 }
5173}
5174//-----------------------------------------------------------------------------
5175
5176void CodeGenerator::WrapInCompoundIfNeeded(const Stmt* stmt, const AddNewLineAfter addNewLineAfter)

Callers 1

InsertCXXMethodHeaderMethod · 0.80

Calls 1

AppendMethod · 0.80

Tested by

no test coverage detected