[clang-tidy] introduce a unused local non trival variable check (#76101)
Introduce a new (off by default) clang tidy check to ensure that
variables of a specific type are always used even if -Wunused-variables
wouldn't generate a warning.
This check has already caught a couple of different bugs on the codebase
I work on, where not handling a future means that lifetimes may not be
kept alive properly as an async chunk of code may run after a class has
been destroyed, etc.
I would like to upstream it because I believe there could be other
applications of this check that would be useful in different contexts.
---------
Signed-off-by:
Tyler Rockwood <rockwood@redpanda.com>
parent
48f36c6e