| 295 | } |
| 296 | |
| 297 | const Decl * |
| 298 | DefMapGenerator::getFirstVarDeclhasSameBeginLoc(const VarDecl &D) const { |
| 299 | const auto *DC = D.getDeclContext(); |
| 300 | if (!DC) |
| 301 | return &D; |
| 302 | |
| 303 | DeclStmtFinder Finder(D); |
| 304 | Finder.TraverseDecl(Decl::castFromDeclContext(DC)); |
| 305 | if (Finder.Result) |
| 306 | return *Finder.Result->decl_begin(); |
| 307 | |
| 308 | for (const auto *GDecl : DC->decls()) { |
| 309 | if (isa<VarDecl>(GDecl) && GDecl->getBeginLoc() == D.getBeginLoc()) |
| 310 | return GDecl; |
| 311 | } |
| 312 | return &D; |
| 313 | } |
| 314 | |
| 315 | std::pair<unsigned, std::string> |
| 316 | DefMapGenerator::getDeclTypeInfo(const VarDecl &D, |
nothing calls this directly
no test coverage detected