Lines Matching defs:DeclName
197 // Returns the shortest qualified name for declaration `DeclName` in the
198 // namespace `NsName`. For example, if `DeclName` is "a::b::X" and `NsName`
200 // Note that if `DeclName` is `::b::X` and `NsName` is `::a::b`, this returns
202 // \param DeclName A fully qualified name, "::a::b::X" or "a::b::X".
205 std::string getShortestQualifiedNameInNamespace(llvm::StringRef DeclName,
207 DeclName = DeclName.ltrim(':');
209 if (!DeclName.contains(':'))
210 return std::string(DeclName);
213 auto DeclNsSplitted = splitSymbolName(DeclName);
218 // If NsName is the global namespace, we can simply use the DeclName sans
221 return std::string(DeclName);
224 // The DeclName must be fully-qualified, but we still need to decide if a
226 // `DeclName` is "b::X", then the reference must be qualified as "::b::X"
229 return ("::" + DeclName).str();
230 return std::string(DeclName);
232 // Since there is already an overlap namespace, we know that `DeclName` can be