sidney added a comment.
In http://reviews.llvm.org/D17043#390188, @alexfh wrote:
> What's the status of this patch? Do you still want to continue working on it
> or are you fine with the warn_unused_result/nodiscard-based solution?
I'm still interested in working on this, but I was waiting for
> On Feb 10, 2016, at 8:05 PM, Joerg Sonnenberger
> wrote:
>
> I'm not a big fan of this. Those calls are by the very definition
> harmless, so they aggrevate the existing problem of stupid annotation.
The issue is that the annotation's current diagnostic is pretty nonspecific and
therefore no
sidney added a comment.
In http://reviews.llvm.org/D17043#348982, @alexfh wrote:
> The attribute can have arguments (e.g. `[[deprecated("use some other API")]]
> void f();`), so if there is a good reason, an argument (e.g. a custom
> message) can be added to the `warn_unused_result` attribute.
sidney added a comment.
In http://reviews.llvm.org/D17043#348525, @alexfh wrote:
> I'd like to note that there is a library-side way to mitigate this issue
> using the `[[clang::warn_unused_result]]` attribute on `vector::empty()` and
> similar methods:
Using an attribute sounds much better t
sidney created this revision.
sidney added reviewers: mclow.lists, alexfh.
sidney added a subscriber: cfe-commits.
Currently has a whitelist of methods like std::vector::empty() which,
in a standalone statement, likely won't do what the programmer wants.
The whitelist is brittle (Did I misspell a
sidney added a comment.
Quick note: this is my first contribution, born from the Clang/LLVM sprint last
weekend. Marshall helped me get started.
http://reviews.llvm.org/D17043
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llv