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

Function MakeLineColumnName

InsightsHelpers.cpp:260–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258//-----------------------------------------------------------------------------
259
260std::string MakeLineColumnName(const SourceManager& sm, const SourceLocation& loc, const std::string_view& prefix)
261{
262 // In case of a macro expansion the expansion(line/column) number gives a unique value.
263 const auto lineNo = loc.isMacroID() ? sm.getExpansionLineNumber(loc) : sm.getSpellingLineNumber(loc);
264 const auto columnNo = loc.isMacroID() ? sm.getExpansionColumnNumber(loc) : sm.getSpellingColumnNumber(loc);
265
266 return StrCat(prefix, lineNo, "_"sv, columnNo);
267}
268//-----------------------------------------------------------------------------
269
270static std::string MakeLineColumnName(const Decl& decl, const std::string_view prefix)

Callers 8

BuildSuspendVarNameFunction · 0.85
InsertCoroutineMethod · 0.85
InsertArgMethod · 0.85
GetLambdaNameFunction · 0.85
BuildRetTypeNameFunction · 0.85
GetTemporaryNameFunction · 0.85

Calls 1

StrCatFunction · 0.85

Tested by

no test coverage detected