| 342 | } |
| 343 | |
| 344 | std::string DefMapGenerator::getNamespaceName(const NamedDecl &D) const { |
| 345 | const std::string AnonymousNS = "(anonymous namespace)::"; |
| 346 | auto Name = D.getQualifiedNameAsString(); |
| 347 | auto Splited = StringRef(Name).rsplit("::"); |
| 348 | if (Splited.second.empty()) |
| 349 | return ""; |
| 350 | |
| 351 | auto Result = Splited.first.str() + "::"; |
| 352 | if (Result.find(AnonymousNS) == 0) |
| 353 | Result = Result.substr(AnonymousNS.size() - 2); |
| 354 | util::replaceStrAll(Result, AnonymousNS, ""); |
| 355 | return Result; |
| 356 | } |
| 357 | |
| 358 | std::pair<std::map<unsigned, std::set<unsigned>>, |
| 359 | std::map<unsigned, std::set<unsigned>>> |
nothing calls this directly
no test coverage detected