Clang enforce [[nodiscard]] by default?

Viewed 449

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 Answers
Related