MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / ~CoroutinesCodeGenerator

Method ~CoroutinesCodeGenerator

CoroutinesCodeGenerator.cpp:44–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42//-----------------------------------------------------------------------------
43
44CoroutinesCodeGenerator::~CoroutinesCodeGenerator()
45{
46 RETURN_IF(not(mASTData.mFrameType and mASTData.mDoInsertInDtor));
47
48 mASTData.mFrameType->completeDefinition();
49
50 OutputFormatHelper ofm{};
51
52 // Using the "normal" CodeGenerator here as this is only about inserting the made up coroutine-frame.
53 CodeGeneratorVariant codeGenerator{ofm};
54 codeGenerator->InsertArg(mASTData.mFrameType);
55
56 // Insert the made-up struct before the function declaration
57 mOutputFormatHelper.InsertAt(mPosBeforeFunc, ofm);
58}
59//-----------------------------------------------------------------------------
60
61static FieldDecl* AddField(CoroutineASTData& astData, std::string_view name, QualType type)

Callers

nothing calls this directly

Calls 2

InsertAtMethod · 0.80
InsertArgMethod · 0.45

Tested by

no test coverage detected