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

Function GetCastName

CodeGenerator.cpp:93–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91using namespace asthelpers;
92
93static std::string_view GetCastName(const CastKind castKind, bool constnessChange = false)
94{
95 if(is{castKind}.any_of(CastKind::CK_BitCast, CastKind::CK_IntegralToPointer, CastKind::CK_PointerToIntegral)) {
96 return kwReinterpretCast;
97 }
98
99 if((CastKind::CK_NoOp == castKind) and constnessChange) {
100 return "const_cast"sv;
101 }
102
103 return kwStaticCast;
104}
105//-----------------------------------------------------------------------------
106
107static std::string_view GetTagDeclTypeName(const TagDecl& decl)

Callers 1

InsertArgMethod · 0.85

Calls 1

any_ofMethod · 0.80

Tested by

no test coverage detected