mizvekov wrote: > > > > > Actually, @mizvekov, can we make the > > > > > `ClassTemplateSpecializationDecl::ClassTemplateSpecializationDecl(ASTContext > > > > > &C, Kind DK)` constructor default initialize the `StrictPackMatch` > > > > > member to false? In that case users of `CreateDeserialized` wouldn't > > > > > need to worry about it being potentially uninitialized? Otherwise > > > > > we'll have to expose a setter and call it from LLDB > > > > > > > > > > > > > > > > > > > > > > > > > > On the ASTReader, we don't need a setter because it's friends with the > > > > class. > > > > > > > > > > > > > > > > > > > > > > > > > > I'd worry a little bit about leaving it always set to a fixed value, > > > > this could be a hard to track bug in the future for the lldb folks, > > > > even if it's probably not observable right now. > > > > > > > > > > > > Yea that's fair. Would you prefer us adding a setter for it then? And set > > > it to a fixed value from LLDB (until we have a better way to deal with > > > it)? > > > > > > Sure, a setter is fine for me. I am not sure from what data you are > > populating the decl, but if it's like the ast import case, you can forward > > the flag from the original decl. > > > > > > If it's being formed from matching as-written template arguments, you can > > forward the result from CheckTemplateArgument. > > > > > > Otherwise if it's fully synthetic, I guess you can leave a comment > > explaining it. > > > > Yea we're creating it from debug-info. Haven't thought about whether we can > infer this field from debug-info, but either way, I'll go the setter approach > then, thanks!
I see. It looks like you would need to call CheckTemplateArgument with the arguments you get from debug info anyway, otherwise some things wouldn't work, like pack parameters. You can use the result from this call to get the value for the flag. Otherwise if you don't currently check the arguments, you could leave a FIXME. https://github.com/llvm/llvm-project/pull/125791 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits