\brief Inserts the instantiation point of a template. This reveals at which place the template is first used.
| 1548 | // |
| 1549 | // This reveals at which place the template is first used. |
| 1550 | void CodeGenerator::InsertInstantiationPoint(const SourceManager& sm, |
| 1551 | const SourceLocation& instLoc, |
| 1552 | std::string_view text) |
| 1553 | { |
| 1554 | const auto lineNo = sm.getSpellingLineNumber(instLoc); |
| 1555 | const auto& fileId = sm.getFileID(instLoc); |
| 1556 | if(const auto file = sm.getFileEntryRefForID(fileId)) { |
| 1557 | const auto fileWithDirName = file->getName(); |
| 1558 | const auto fileName = llvm::sys::path::filename(fileWithDirName); |
| 1559 | |
| 1560 | if(text.empty()) { |
| 1561 | text = "First instantiated from: "sv; |
| 1562 | } |
| 1563 | |
| 1564 | mOutputFormatHelper.AppendCommentNewLine(text, fileName, ":"sv, lineNo); |
| 1565 | } |
| 1566 | } |
| 1567 | //----------------------------------------------------------------------------- |
| 1568 | |
| 1569 | void CodeGenerator::InsertTemplateGuardBegin(const FunctionDecl* stmt) |
nothing calls this directly
no test coverage detected