martong requested changes to this revision.
martong added a reviewer: balazske.
martong added inline comments.
This revision now requires changes to proceed.


================
Comment at: lib/AST/ASTImporter.cpp:5026
+        ClassTemplate->findPartialSpecialization(TemplateArgs,
+            PartialSpec->getAssociatedConstraints(), InsertPos);
   else
----------------
`ClassTemplate` is in the "to" context, i.e. it is already imported.
`PartialSpec` is in the "from" context, not yet imported.
Thus, `findPartialSpecialization` is going search for a specialization in the 
"to" context but with constraints which are in the "from" context. So I suppose 
this will not find any match.
So, first you have to import the associated constraints expression and then use 
that in the search.

Something like:
```
  ExpectedExpr ConstraintsOrErr = import(D->getAssociatedConstraints());
  if (!ConstraintsOrErr)
    return ConstraintsOrErr.takeError();
  // ...
  ClassTemplate->findPartialSpecialization(TemplateArgs,
            *ConstraintsOrErr, InsertPos);

```
(The same  below.)


Repository:
  rC Clang

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

https://reviews.llvm.org/D41910



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to