llvm / llvm/llvm-project

[LifetimeSafety] Diagnose missing [[lifetimebound]] on overridden methods

Open
#198,344 2 comments 0 reactions 0 assignees View on GitHub
clang:diagnostics clang:frontend clang:temporal-safety
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

As per the Liskov substitution principle, overrides should work correctly in the scenarios where the overridden methods works correctly. If the override has `lifetimebound` annotations that are missing from the overridden methods, the override has additional requirements that are not enforced when a virtual call is happening.

We should have a warning to diagnose these cases.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.