[PATCH] D135088: [Clang] make canonical AutoType constraints-free
Yuanfang Chen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 3 17:54:45 PDT 2022
ychen added inline comments.
================
Comment at: clang/lib/AST/ASTContext.cpp:5745-5746
+ if (TypeConstraintConcept) {
+ Canon = getAutoTypeInternal(QualType(), Keyword, false, IsPack, nullptr,
+ {}, true);
// Find the insert position again.
----------------
mizvekov wrote:
> ychen wrote:
> > ychen wrote:
> > > ychen wrote:
> > > > mizvekov wrote:
> > > > > Also adds back the `isDependent` flag. Any reason to have removed it?
> > > > I was thinking the replacement type is null, so there is no need to depend on instantiation?
> > > > I was thinking the replacement type is null, so there is no need to depend on instantiation?
> > >
> > >
> > Sorry I was not precise. I meant the constrained non-canonical AutoType would always be used for template instantiation. But I think it could happen that the user may query dependencies of the canonical AutoType of a constrained AutoType, maybe it just doesn't show up in the codebase yet. I'll put it back.
> FYI my memory is fuzzy right now, but we do have the distinction between undeduced but non-dependent, and undeduced but dependent. It's suspicious that no tests fail though. It could be either it doesn't matter for the canonical type, or that the test would be a bit convoluted.
Yeah, I'm not confident to remove it right now. Already put it back.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135088/new/
https://reviews.llvm.org/D135088
More information about the cfe-commits
mailing list