[clang] [Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (PR #78274)

Krystian Stasiowski via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 16 09:10:33 PST 2024


================
@@ -6070,7 +6070,7 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state,
 ///
 /// The result of this call will never be null, but the associated
 /// type may be a null type if there's an unrecoverable error.
-TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D, Scope *S) {
+TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D) {
----------------
sdkrystian wrote:

Removing the unused parameter is more of a "courtesy" to anyone trying to make sense of the changes in the future. This explicitly indicate no dependency on the scope, which I believe to be better than changing the argument value at the call site without further elaboration. 

The commit that fixes the issue does not strictly depend on the commit which removes these unused parameters, but I saw them as being sufficiently related to warrant their inclusion in the same PR. I can move the first commit to it's own PR if you think that's better. 

https://github.com/llvm/llvm-project/pull/78274


More information about the cfe-commits mailing list