Fznamznon added inline comments.

================
Comment at: clang/lib/Sema/SemaTemplate.cpp:1614
 
-    TemplateArgument SugaredConverted, CanonicalConverted;
-    ExprResult DefaultRes = CheckTemplateArgument(
----------------
shafik wrote:
> Out of curiosity where is the template argument being checked now and why 
> does checking it early cause the failure?
After the patch template argument is checked when the template is instantiated, 
i.e. the check now happens together for the whole provided template argument 
list.
Early checking causes reject-valid problems when for example a function is 
forward declared, used in default template argument and then defined later but 
before the point of instantiation. With early check the error also would be 
emitted if default template argument was never used.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150108

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

Reply via email to