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

Function GetNamePlain

InsightsHelpers.cpp:87–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85//-----------------------------------------------------------------------------
86
87static std::string GetNamePlain(const NamedDecl& decl)
88{
89 if(const auto* fd = dyn_cast_or_null<FunctionDecl>(&decl); fd and GetInsightsOptions().UseShow2C) {
90 if(fd->isOverloadedOperator()) {
91 switch(fd->getOverloadedOperator()) {
92#define OVERLOADED_OPERATOR(Name, Spelling, Token, Unary, Binary, MemberOnly) \
93 case OO_##Name: return "operator" #Name;
94
95#include "clang/Basic/OperatorKinds.def"
96
97#undef OVERLOADED_OPERATOR
98 default: break;
99 }
100 }
101 }
102
103 return decl.getDeclName().getAsString();
104}
105
106std::string GetPlainName(const DeclRefExpr& DRE)
107{

Callers 2

GetPlainNameFunction · 0.85
GetNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected