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

Function Variable

ASTHelpers.cpp:493–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491//-----------------------------------------------------------------------------
492
493VarDecl* Variable(std::string_view name, QualType type, DeclContext* dc)
494{
495 auto& ctx = GetGlobalAST();
496
497 if(nullptr == dc) {
498 dc = GetGlobalAST().getTranslationUnitDecl();
499 }
500
501 return VarDecl::Create(const_cast<ASTContext&>(ctx), dc, {}, {}, &ctx.Idents.get(name), type, nullptr, SC_None);
502}
503//-----------------------------------------------------------------------------
504
505NullStmt* mkNullStmt()

Callers 10

VisitCoawaitExprMethod · 0.85
InsertCoroutineMethod · 0.85
mkVarDeclRefExprFunction · 0.85
TemporaryDeclFinderMethod · 0.85
VtblArrayVarMethod · 0.85
InsertArgMethod · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected