@@ -64,20 +64,23 @@ namespace utils {
6464
6565 // /\brief Get the mangled name of a GlobalDecl.
6666 // /
67- // /\param [in] GD - try to mangle this decl's name.
68- // /\param [out] mangledName - put the mangled name in here.
67+ // /\param [in] GD - Try to mangle this decl's name.
6968 // /
70- void maybeMangleDeclName (const clang::GlobalDecl& GD,
71- std::string& mangledName);
69+ // /\returns The mangled or pure name (when ND should not be mangled) on
70+ // / success or an empty string on failure.
71+ // /
72+ std::string maybeMangleDeclName (const clang::GlobalDecl& GD);
7273
73- // /\brief Get the mangled name of a clang::Decl subclass. FunctionDecls and
74- // / VarDecls are currently supported.
74+ // /\brief Get the mangled name of a clang::Decl subclass. FunctionDecl,
75+ // / VarDecl, ValueDecl, and NamedDecl are currently supported.
7576 // /
76- // /\param [in] Decl - try to mangle this decl's name.
77- // /\param [out] mangledName - put the mangled name in here.
77+ // /\param [in] Decl - Try to mangle this decl's name.
78+ // /
79+ // /\returns The mangled or pure name (when ND should not be mangled) on
80+ // / success or an empty string on failure.
7881 // /
7982 template <typename T>
80- void maybeMangleDeclName (const T* Decl, std::string& mangledName );
83+ std::string maybeMangleDeclName (const T* Decl);
8184
8285 // /\brief Retrieves the last expression of a function body. If it was a
8386 // / DeclStmt with a variable declaration, creates DeclRefExpr and adds it to
0 commit comments