================ @@ -182,6 +182,12 @@ static bool ShouldDiagnoseAvailabilityInContext( return false; } + if (K == AR_Deprecated) { + if (const auto *VD = dyn_cast<VarDecl>(OffendingDecl)) + if (VD->isLocalVarDecl() && VD->isDeprecated()) ---------------- Sirraide wrote:
```suggestion if (VD->isLocalVarDeclOrParm() && VD->isDeprecated()) ``` Otherwise, this won’t handle cases such as: ```c++ [[deprecated]] void f([[deprecated]] int x) { x = 4; } ``` We should also add a test for that. https://github.com/llvm/llvm-project/pull/113575 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits