[llvm] r190708 - Add warn_unused_result to empty() on various containers.

Benjamin Kramer benny.kra at gmail.com
Fri Sep 13 11:58:37 PDT 2013


On 13.09.2013, at 20:40, David Blaikie <dblaikie at gmail.com> wrote:

> This seems tedious (though I appreciate the work) - how bad would it be if Clang assumed const member functions with no parameters were warn_unused_result?

Mutable members prevent using the C++ "const" keyword, I don't think it's feasible to turn such a warning on by default. Do we perform analysis in Clang to check whether a function has side effects? If so, we could use that.

- Ben



More information about the llvm-commits mailing list