[PATCH] D119544: Deferred Concept Instantiation Implementation
Chuanqi Xu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 31 02:24:50 PDT 2022
ChuanqiXu added a comment.
I am interested in this one. But it is absolutely not easy to understand...
================
Comment at: clang/include/clang/Sema/Sema.h:6991-6993
/// \param TemplateArgs the list of template arguments to substitute into the
- /// constraint expression.
+ /// constraint expression, which is multi-level since we have to substitute
+ /// ALL levels for the purposes of checking.
----------------
Now the comment is not precise.
================
Comment at: clang/include/clang/Sema/Sema.h:7011
+
+ bool CheckConstraintSatisfaction(
+ const NamedDecl *Template, ArrayRef<const Expr *> ConstraintExprs,
----------------
I think this one need comment too. What's the difference with the above one?
================
Comment at: clang/lib/Sema/SemaConcept.cpp:167
+ return LHSRes.isUsable() ? BO.recreateBinOp(S, LHSRes) : ExprEmpty();
+ // return BO.recreateBinOp(S, LHSRes);
----------------
We should delete this one.
================
Comment at: clang/lib/Sema/SemaConcept.cpp:177
+ return LHSRes.isUsable() ? BO.recreateBinOp(S, LHSRes) : ExprEmpty();
+ // return BO.recreateBinOp(S, LHSRes);
----------------
ditto
================
Comment at: clang/lib/Sema/SemaConcept.cpp:429-435
+ if (TemplateArgs) {
+ MultiLevelTemplateArgumentList JustTemplArgs(
+ *FD->getTemplateSpecializationArgs());
+ if (addInstantiatedParametersToScope(
+ FD, PrimaryTemplate->getTemplatedDecl(), Scope, JustTemplArgs))
+ return {};
+ }
----------------
Might you elaborate more on this. I am not sure about the intention.
================
Comment at: clang/lib/Sema/SemaConcept.cpp:489
+ // Attn Reviewers: we need to do this for the function constraints for
+ // comparison of constraints to work, but do we also need to do it for
+ // CheckInstantiatedFunctionConstraints? That one is more difficult, but we
----------------
Would you mind to elaborate for the issue "function constraints for comparison of constraints to work" more? Maybe it is said in previous messages, but the history is hard to follow...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119544/new/
https://reviews.llvm.org/D119544
More information about the cfe-commits
mailing list