MCPcopy Create free account
hub / github.com/Samsung/UTopia / getNamespaceName

Method getNamespaceName

lib/inputanalysis/DefMapGenerator.cpp:344–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344std::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
358std::pair<std::map<unsigned, std::set<unsigned>>,
359 std::map<unsigned, std::set<unsigned>>>

Callers

nothing calls this directly

Calls 4

replaceStrAllFunction · 0.85
emptyMethod · 0.80
sizeMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected