[PATCH] D85282: [Concepts] Dump template arguments for immediately declared constraint.
Nathan Ridge via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 5 23:51:56 PDT 2020
nridge added a comment.
This patch has helped me understand the difference between the two `ConceptReference`s in the AST (the `TypeConstraint` and the `ConceptSpecializationExpr`).
Given that
`template <binary_concept<int> R>`
is a shorthand for
`template <typename R> requires binary_concept<R, int>`
the `TypeConstraint` is the explicitly written `binary_concept<int>` whose `getTemplateArgsAsWritten()` has one element: `<int>`.
Meanwhile the `ConceptSpecializationExpr` is the implicit `binary_concept<R, int>` whose `getTemplateArgsAsWritten()` has two elements: `<R, int>`.
Is there a reason to prefer dumping one over the other (or even both)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85282/new/
https://reviews.llvm.org/D85282
More information about the cfe-commits
mailing list