| 546 | } |
| 547 | |
| 548 | static 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 | |
| 560 | void Annotator::registerReference(clang::NamedDecl* decl, clang::SourceRange range, Annotator::TokenType type, |
| 561 | Annotator::DeclType declType, std::string typeText, |
no outgoing calls
no test coverage detected