[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 10 11:08:01 PDT 2022


erichkeane added a comment.

So from what I can tell, the problem is evaluating `Constraint` on `initiate`, and trying to find the 'right' argument from the `MultiLevelTemplateArgumentList` for `RawCompletionToken`.  The problem is that the `RawCompletionToken`, as a template parameter, gets 'filled in to' the Concept relative to `initiate` instead of relative to the "root".

I suspect we have to go back to when the `ConceptSpecializationExpr` was created, and change the template argument to be relative to the top?  I'm not sure that is the right answer here, or what else that could screw up?  In my head, I think it should be 'fine', since the 'relative to the top' is the way we evaluate ALL constraints (including these in the template argument), but I probably need to think it through.

See:

  FunctionTemplateDecl 0x13575598 <block_echo_server_pp.cpp:7:5, line:8:77> col:17 initiate
  |-TemplateTypeParmDecl 0x13573fd8 <line:7:15, col:24> col:24 typename depth 0 index 0 Initiation
  |-TemplateTypeParmDecl 0x13574060 <col:36, col:47> col:47 Concept 0x13555838 'Constraint' depth 0 index 1 RawCompletionToken
  | `-ConceptSpecializationExpr 0x135741a8 <col:36> 'bool' Concept 0x13555838 'Constraint'
  |   `-TemplateArgument <col:47> type 'RawCompletionToken'
  |     `-TemplateTypeParmType 0x13574130 'RawCompletionToken' dependent depth 0 index 1
  |       `-TemplateTypeParm 0x13574060 'RawCompletionToken'




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126907/new/

https://reviews.llvm.org/D126907



More information about the cfe-commits mailing list