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

Function mkStdFunctionDecl

ASTHelpers.cpp:415–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413//-----------------------------------------------------------------------------
414
415auto* mkStdFunctionDecl(std::string_view name, QualType returnType, const params_vector& parameters)
416{
417 auto& ctx = GetGlobalAST();
418 NamespaceDecl* stdNs = NamespaceDecl::Create(const_cast<ASTContext&>(ctx),
419 ctx.getTranslationUnitDecl(),
420 false,
421 {},
422 {},
423 &ctx.Idents.get("std"),
424 nullptr,
425 false);
426
427 return FunctionBase(name, returnType, parameters, stdNs);
428}
429//-----------------------------------------------------------------------------
430
431DeclRefExpr* mkDeclRefExpr(const ValueDecl* vd)

Callers

nothing calls this directly

Calls 2

FunctionBaseFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected