[PATCH] D92101: [Clang][Sema] Attempt to fix CTAD faulty copy of non-local typedefs
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 30 13:11:25 PST 2020
rsmith added inline comments.
================
Comment at: clang/lib/Sema/SemaTemplate.cpp:2077
QualType TransformTypedefType(TypeLocBuilder &TLB, TypedefTypeLoc TL) {
ASTContext &Context = SemaRef.getASTContext();
----------------
The check to see if we should clone a typedef or not should be moved into this function.
================
Comment at: clang/lib/Sema/SemaTemplate.cpp:2352
llvm::SmallVectorImpl<TypedefNameDecl *> &MaterializedTypedefs) {
TypeSourceInfo *OldDI = OldParam->getTypeSourceInfo();
+
----------------
Hmm, we're only applying the logic in the case where the top-level type of a parameter is a typedef type. That doesn't seem right; this won't do the right thing for `Constructor(Typedef*)` and similar. Also, we don't want to skip the parameter transform entirely if we find a such a typedef; instead, we should only skip cloning the typedef itself.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92101/new/
https://reviews.llvm.org/D92101
More information about the cfe-commits
mailing list