================
@@ -35,7 +35,10 @@ inline bool IsLifetimeSafetyDiagnosticEnabled(Sema &S, const
Decl *D) {
!Diags.isIgnored(diag::warn_lifetime_safety_invalidation,
D->getBeginLoc()) ||
!Diags.isIgnored(diag::warn_lifetime_safety_noescape_escapes,
- D->getBeginLoc());
+ D->getBeginLoc()) ||
+ !Diags.isIgnored(
+ diag::warn_lifetime_safety_param_lifetimebound_violation,
+ D->getBeginLoc());
}
----------------
usx95 wrote:
While you are at it, maybe convert this into a `for` for readability.
```cpp
constexpr unsigned DiagIDs[] = {
diag::warn_lifetime_safety_use_after_scope,
diag::warn_lifetime_safety_use_after_scope_moved,
diag::warn_lifetime_safety_return_stack_addr,
diag::warn_lifetime_safety_return_stack_addr_moved,
diag::warn_lifetime_safety_invalidation,
diag::warn_lifetime_safety_noescape_escapes,
diag::warn_lifetime_safety_param_lifetimebound_violation,
};
for (unsigned DiagID : DiagIDs)
if (!Diags.isIgnored(DiagID, D->getBeginLoc()))
return true;
return false;
```
We are also missing quite a few newly added diags as well here like uaf,
dangling-field/global, etc. Feel free to add them here or in a separate PR.
https://github.com/llvm/llvm-project/pull/196144
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits