================
@@ -1130,7 +1132,19 @@ 
ImplicitConceptSpecializationDecl::ImplicitConceptSpecializationDecl(
 ImplicitConceptSpecializationDecl::ImplicitConceptSpecializationDecl(
     EmptyShell Empty, unsigned NumTemplateArgs)
     : Decl(ImplicitConceptSpecialization, Empty),
-      NumTemplateArgs(NumTemplateArgs) {}
+      NumTemplateArgs(NumTemplateArgs) {
+  // ASTReader registers a decl before ASTDeclReader visits it, so re-entrant
+  // deserialization can reach this one through a ConceptSpecializationExpr and
+  // call getTemplateArguments() before setTemplateArguments() has run. Give
----------------
zyn0217 wrote:

I'm still very confused: can you explain when and how we reach 
`getTemplateArguments()` with half-initialized Decl? I guess there might be a 
bug elsewhere

https://github.com/llvm/llvm-project/pull/222148
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to