From d855f8f67a4588f44ade0ed19744c99bfe81e76c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 29 Jun 2022 09:45:46 -0400 Subject: Use nodiscard attribute --- test/.clang-tidy | 1 - test/headers/.clang-tidy | 1 - test/maid_test.cpp | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) (limited to 'test') diff --git a/test/.clang-tidy b/test/.clang-tidy index 7563367..b51e83e 100644 --- a/test/.clang-tidy +++ b/test/.clang-tidy @@ -29,7 +29,6 @@ Checks: > -llvmlibc-*, -modernize-make-unique, -modernize-return-braced-init-list, - -modernize-use-nodiscard, -modernize-use-trailing-return-type, -readability-function-cognitive-complexity, -readability-identifier-length, diff --git a/test/headers/.clang-tidy b/test/headers/.clang-tidy index 1a91f8b..1beaf9e 100644 --- a/test/headers/.clang-tidy +++ b/test/headers/.clang-tidy @@ -21,7 +21,6 @@ Checks: > -hicpp-no-array-decay, -llvmlibc-*, -modernize-return-braced-init-list, - -modernize-use-nodiscard, -modernize-use-trailing-return-type, -readability-identifier-length, -readability-implicit-bool-conversion, diff --git a/test/maid_test.cpp b/test/maid_test.cpp index cb4e461..2a936f9 100644 --- a/test/maid_test.cpp +++ b/test/maid_test.cpp @@ -38,7 +38,7 @@ public: ~Junk() override { --n_junk; } - size_t value() const { return _val; } + [[nodiscard]] size_t value() const { return _val; } private: size_t _val; -- cgit v1.2.1