[clang-doc] Use QualName in Markdown output

QualName will provide the more useful typename when the type is
templated.

Fixes #67549

Reviewers: petrhosek, PeterChou1

Reviewed By: petrhosek

Pull Request: https://github.com/llvm/llvm-project/pull/119815
This commit is contained in:
Paul Kirth 2024-12-13 09:58:08 -08:00 committed by GitHub
parent e113a72562
commit 229d78de31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -157,17 +157,17 @@ static void genMarkdown(const ClangDocContext &CDCtx, const FunctionInfo &I,
for (const auto &N : I.Params) {
if (!First)
Stream << ", ";
Stream << N.Type.Name + " " + N.Name;
Stream << N.Type.QualName + " " + N.Name;
First = false;
}
writeHeader(I.Name, 3, OS);
std::string Access = getAccessSpelling(I.Access).str();
if (Access != "")
writeLine(genItalic(Access + " " + I.ReturnType.Type.Name + " " + I.Name +
"(" + Stream.str() + ")"),
writeLine(genItalic(Access + " " + I.ReturnType.Type.QualName + " " +
I.Name + "(" + Stream.str() + ")"),
OS);
else
writeLine(genItalic(I.ReturnType.Type.Name + " " + I.Name + "(" +
writeLine(genItalic(I.ReturnType.Type.QualName + " " + I.Name + "(" +
Stream.str() + ")"),
OS);
if (I.DefLoc)

View File

@ -150,7 +150,7 @@ tuple<int,int,bool> func_with_tuple_param(tuple<int,int,bool> t){ return t;}
// YAML-NEXT: ...
// MD: ### func_with_tuple_param
// MD: *tuple func_with_tuple_param(tuple t)*
// MD: *tuple<int, int, _Bool> func_with_tuple_param(tuple<int, int, _Bool> t)*
// MD: *Defined at {{.*}}templates.cpp#[[# @LINE - 44]]*
// MD: A function with a tuple parameter
// MD: **t** The input to func_with_tuple_param