aaronpuchert added a comment.

> in some cases (e.g. implicit deduction guide templates synthesized from the 
> constructor), hasTypeConstraint returns true, and getTypeConstraint returns a 
> nullptr.

If that's the case, can we reproduce this with a parsed AST? I've only seen 
this error on deserialized ASTs, so I'm not sure it isn't in fact a 
serialization issue.

But I agree with you that `hasTypeConstraint` returning `HasTypeConstraint` and 
`getTypeConstraint` checking `TypeConstraintInitialized` makes the interface 
easy to misuse. Haven't seen anywhere in the AST a concept of having, but not 
having initialized a property—either it's there or not.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84455

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

Reply via email to