HamzaHassanain wrote:

@cor3ntin 

About the current diagnostic,  `expected-error {{declaration of variable 'u' 
with deduced type 'E' requires an initializer}}` is this the correct 
diagnostic?  (`err_auto_var_requires_init`) Or should it be:

`expected-error {{alias template 'E' requires template arguments; argument 
deduction only allowed for class templates or alias templates}}` 
(`err_deduced_non_class_or_alias_template_specialization_type`) ? 

I believe the first one is fine. If not, could you please tell me, should I try 
to handle it inside 

[SemaDecl/Sema::deduceVarTypeFromInitializer](https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaDecl.cpp#L13191-L13337)
 

Or would it be inside 

[SemaInit.cpp/Sema::DeduceTemplateSpecializationFromInitializer](https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaInit.cpp#L10065-L10454)

Also, about moving to a separate file,  the file you mentioned uses `c++14`, 
while the whole issue is with `C++17, C++ 20, C++23.`, So I believe we should 
keep it in a separate file?

I am very confused also with @zwuis comments, could you please explain a bit 
more? Or at least give me a little clue?

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

Reply via email to