Clang enforce [[nodiscard]] by default?

1.2k Views Asked by At

C++17 has the nodiscard attribute to prevent people ignoring a function's return value.

It seems overkill to add this to every single function in a code base.

Is there a flag to tell Clang to enforce this by default?

0

There are 0 best solutions below