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

Method WrapInParensIfNeeded

CodeGenerator.cpp:5217–5226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5215//-----------------------------------------------------------------------------
5216
5217void CodeGenerator::WrapInParensIfNeeded(bool needsParens,
5218 void_func_ref lambda,
5219 const AddSpaceAtTheEnd addSpaceAtTheEnd)
5220{
5221 if(needsParens) {
5222 WrapInParensOrCurlys(BraceKind::Parens, lambda, addSpaceAtTheEnd);
5223 } else {
5224 lambda();
5225 }
5226}
5227//-----------------------------------------------------------------------------
5228
5229void CodeGenerator::WrapInCurliesIfNeeded(bool needsParens,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected