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

Function CallDestructor

ASTHelpers.cpp:658–666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

656//-----------------------------------------------------------------------------
657
658CallExpr* CallDestructor(const VarDecl* varDecl)
659{
660 auto* lhsDeclRef = mkDeclRefExpr(varDecl);
661
662 auto* callDtor = CreateFunctionDecl(StrCat("Destructor_"sv, GetName(varDecl->getType())),
663 {{kwInternalThis, lhsDeclRef->getType()}});
664
665 return Call(callDtor, {Ref(lhsDeclRef)});
666}
667//-----------------------------------------------------------------------------
668
669QualType Typedef(std::string_view name, QualType underlayingType)

Callers 1

InsertArgMethod · 0.85

Calls 6

mkDeclRefExprFunction · 0.85
CreateFunctionDeclFunction · 0.85
StrCatFunction · 0.85
GetNameFunction · 0.85
RefFunction · 0.85
CallFunction · 0.70

Tested by

no test coverage detected