================
@@ -885,16 +885,19 @@ bool Sema::DiagnoseUninstantiableTemplate(SourceLocation 
PointOfInstantiation,
 /// that the template parameter 'PrevDecl' is being shadowed by a new
 /// declaration at location Loc. Returns true to indicate that this is
 /// an error, and false otherwise.
-void Sema::DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl) 
{
+void Sema::DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl,
+                                           bool IssueWarning) {
----------------
sdkrystian wrote:

@AaronBallman In VS20222 the javadocs show up even when they are attached to 
the definition... but I'll move them to the declaration to be on the safe side 
:)

While I agree with changing the name to `SupportedAsExtension`, I don't think 
the change to the diagnostic selection logic is quite right. When MSVC 
compatibility **is** enabled, template parameter shadowing is _always_ allowed 
(read: there are no cases where shadowing would be an error with MSVC 
compatibility enabled), so we should issue the MSVC specific diagnostic 
regardless of `SupportedAsExtension`.  `SupportedAsExtension` should be used to 
select between the error/extension diagnostic only when MSVC compatibility **is 
not** enabled. Perhaps we name it `SupportedForCompatibility` instead? 



https://github.com/llvm/llvm-project/pull/79683
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to