[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:39:08 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.
----------------
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?
================
Comment at: clang/lib/AST/ASTContext.cpp:5745-5746
+ if (TypeConstraintConcept) {
+ Canon = getAutoTypeInternal(QualType(), Keyword, false, IsPack, nullptr,
+ {}, true);
// Find the insert position again.
----------------
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.
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