================
@@ -7417,6 +7477,12 @@ ExprResult Sema::CheckTemplateArgument(NamedDecl *Param, 
QualType ParamType,
     if (Value.isAddrLabelDiff())
       return Diag(StartLoc, diag::err_non_type_template_arg_addr_label_diff);
 
+    if (ParamType->isRecordType() &&
+        !ParamType->isInstantiationDependentType() &&
----------------
zwuis wrote:

If I didn't miss anything, yes.

`APValue` doesn't contain the type information about the complete object. If we 
remove the type from the profile, two objects of two different empty classes 
share the same `TemplateParamObjectDecl`.

Template parameter objects can be accessed at runtime. I have no idea how to 
handle them in the CodeGen part.

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

Reply via email to