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

Function getDefinitionDecl

generator/annotator.cpp:548–558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546}
547
548static const clang::Decl *getDefinitionDecl(clang::Decl *decl) {
549 if (const clang::RecordDecl* rec = llvm::dyn_cast<clang::RecordDecl>(decl)) {
550 rec = rec->getDefinition();
551 if (rec) return rec;
552 } else if (const clang::FunctionDecl* fnc = llvm::dyn_cast<clang::FunctionDecl>(decl)) {
553 if (fnc->hasBody(fnc) && fnc) {
554 return fnc;
555 }
556 }
557 return decl->getCanonicalDecl();
558}
559
560void Annotator::registerReference(clang::NamedDecl* decl, clang::SourceRange range, Annotator::TokenType type,
561 Annotator::DeclType declType, std::string typeText,

Callers 2

registerReferenceMethod · 0.85
registerOverrideMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected