[libcxx-commits] [PATCH] D130308: [clang] extend getCommonSugaredType to merge sugar nodes
David Rector via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Aug 14 11:24:22 PDT 2022
davrec added inline comments.
================
Comment at: clang/lib/AST/ASTContext.cpp:12767
+ Ctx.getQualifiedType(Underlying),
+ ::getCommonDecl(EX->getOwnedTagDecl(), EY->getOwnedTagDecl()));
+ }
----------------
This last argument should probably be omitted/nullptr passed, since
# We probably won't encounter any owned tag decls in the types passed to this function;
# Even if we did, it would not necessarily be true that they both have non-null owned tag decls, and I don't see any nullptr checks in getCommonDecl; and
# Even if we checked for nullptr there, and say passed the same argument to X and Y so EX==EY, and that had an owned tag decl, it is not clear to me it would be appropriate to construct a new type with the same owned tag decl as another type.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130308/new/
https://reviews.llvm.org/D130308
More information about the libcxx-commits
mailing list