[PATCH] D91488: Consider reference, pointer, and pointer-to-membber TemplateArguments to be different if they have different types.
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 9 19:28:14 PST 2020
rjmccall added inline comments.
================
Comment at: clang/lib/AST/ItaniumMangle.cpp:3758
TemplateArgument TA(T->getNumBitsExpr());
- mangleTemplateArgs(&TA, 1);
+ mangleTemplateArgs(TemplateName(), &TA, 1);
if (T->isUnsigned())
----------------
Passing a null TemplateName here causes these to get the unresolved treatment, which means mangling the exact type, right? I guess it just never matters for integer arguments?
================
Comment at: clang/lib/AST/ItaniumMangle.cpp:4847
+ /// Do we need to mangle template arguments with exactly correct types?
+ bool needExactType(unsigned I) const {
+ // We need correct types when the template-name is unresolved or when it
----------------
This comment should probably say explicitly that I is the parameter index. Do we need to worry about packs that haven't yet been packed? Is it true that if we have a resolved template then we should always have packed the matching arguments?
================
Comment at: clang/lib/AST/ItaniumMangle.cpp:4963
+ if (D->isCXXInstanceMember())
+ Value = APValue(D, false, {});
+ else if (D->getType()->isArrayType() &&
----------------
Could you `/*comment*/` the false here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91488/new/
https://reviews.llvm.org/D91488
More information about the cfe-commits
mailing list