================
@@ -1969,7 +1970,7 @@ void
ASTDeclWriter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) {
if (OwnsDefaultArg)
Record.AddTemplateArgumentLoc(D->getDefaultArgument());
- if (!TC && !OwnsDefaultArg &&
+ if (!D->hasTypeConstraint() && !OwnsDefaultArg &&
----------------
shafik wrote:
The logic here is a little tricky. The new condition is really "it has a
constraint and it does not matter if it is initialized".
I feel like this deserves a comment.
It also makes me wonder if "initialized" is the right word here, isn't it
really that it was invalid?
I am just thinking of folks coming to maintain this code in the future and
understanding the intent and I don't think the intent is 💯 clear as written.
https://github.com/llvm/llvm-project/pull/122065
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits