Fix modernize-use-nodiscard for classes marked [[nodiscard]]
authorAaron Ballman <aaron@aaronballman.com>
Wed, 30 Oct 2019 17:44:18 +0000 (13:44 -0400)
committerAaron Ballman <aaron@aaronballman.com>
Wed, 30 Oct 2019 17:45:37 +0000 (13:45 -0400)
commit661d2ce619e05dc47a9a232333c01dcba445cd13
treea57afb58737ac71cadec2113ddf6dd706ea58a57
parent5cc605bcc183ffcee9386a37e55b4863d72b045c
Fix modernize-use-nodiscard for classes marked [[nodiscard]]

Current implementation suggests to add [[nodiscard]] to methods even if the
return type is marked already as [[nodiscard]].

Patch by Eugene Sedykh.
clang-tools-extra/clang-tidy/modernize/UseNodiscardCheck.cpp
clang-tools-extra/test/clang-tidy/checkers/modernize-use-nodiscard.cpp