Bug 1902891 - Do not use written template args for canonical field type. r=asuth

Differential Revision: https://phabricator.services.mozilla.com/D213898
This commit is contained in:
Tooru Fujisawa 2024-06-17 00:31:45 +00:00
Родитель adabc8b89f
Коммит 232c521ae5
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -1201,9 +1201,14 @@ public:
J.objectBegin();
J.attribute("pretty", getQualifiedName(&Field));
J.attribute("sym", getMangledName(CurMangleContext, &Field));
QualType FieldType = Field.getType();
QualType CanonicalFieldType = FieldType.getCanonicalType();
J.attribute("type", CanonicalFieldType.getAsString());
LangOptions langOptions;
PrintingPolicy Policy(langOptions);
Policy.PrintCanonicalTypes = true;
J.attribute("type", CanonicalFieldType.getAsString(Policy));
const TagDecl *tagDecl = CanonicalFieldType->getAsTagDecl();
if (!tagDecl) {
// Try again piercing any pointers/references involved. Note that our