MCPcopy Create free account
hub / github.com/KDAB/codebrowser / getContextStr

Method getContextStr

generator/annotator.cpp:946–959  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

944}
945
946std::string Annotator::getContextStr(clang::NamedDecl* usedContext)
947{
948 clang::FunctionDecl *fun = llvm::dyn_cast<clang::FunctionDecl>(usedContext);
949 clang::DeclContext* context = usedContext->getDeclContext();
950 while(!fun && context) {
951 fun = llvm::dyn_cast<clang::FunctionDecl>(context);
952 if (fun && !fun->isDefinedOutsideFunctionOrMethod())
953 fun = nullptr;
954 context = context->getParent();
955 }
956 if (fun)
957 return getReferenceAndTitle(fun).first;
958 return {};
959}
960
961std::string Annotator::getVisibleRef(clang::NamedDecl* Decl)
962{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected