diff options
| author | Roy Jacobson <roy@dragonflydb.io> | 2023-05-29 22:57:39 +0300 |
|---|---|---|
| committer | Roy Jacobson <roy@dragonflydb.io> | 2023-05-29 23:02:32 +0300 |
| commit | 40af06ccc7bf9989b8deb410ed78a4795c22aa73 (patch) | |
| tree | 44301a40ba566d574bf5f5d34dbd6e32ab15537d | |
| parent | 725f0be8aec37561b8f2237c7f089742142b0e16 (diff) | |
[clang-tidy] Update UnusedReturnValueCheck types
Update the types for UnusedReturnValueCheck after D151383.
1. Add std::errc, std:error_condition
2. Remove `absl::Status` - it's marked as `[[nodiscard]]` anyway so it's redundant (and might create double warnings) to check it.
Reviewed By: PiotrZSL
Differential Revision: https://reviews.llvm.org/D151650
| -rw-r--r-- | clang-tools-extra/clang-tidy/bugprone/UnusedReturnValueCheck.cpp | 5 | ||||
| -rw-r--r-- | clang-tools-extra/docs/clang-tidy/checks/bugprone/unused-return-value.rst | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-tidy/bugprone/UnusedReturnValueCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/UnusedReturnValueCheck.cpp index f8139381d7e0..bdc601c2445f 100644 --- a/clang-tools-extra/clang-tidy/bugprone/UnusedReturnValueCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/UnusedReturnValueCheck.cpp @@ -127,9 +127,10 @@ UnusedReturnValueCheck::UnusedReturnValueCheck(llvm::StringRef Name, "::ttyname")), CheckedReturnTypes(utils::options::parseStringList( Options.get("CheckedReturnTypes", "::std::error_code;" + "::std::error_condition;" + "::std::errc;" "::std::expected;" - "::boost::system::error_code;" - "::abseil::Status"))) {} + "::boost::system::error_code"))) {} void UnusedReturnValueCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { Options.store(Opts, "CheckedFunctions", CheckedFunctions); diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone/unused-return-value.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone/unused-return-value.rst index 89c781b0fe71..c9b24dbcbb94 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone/unused-return-value.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone/unused-return-value.rst @@ -50,7 +50,7 @@ Options Semicolon-separated list of function return types to check. By default the following function return types are checked: - `::std::error_code`, `::std::expected`, `::boost::system::error_code`, `::abseil::Status` + `::std::error_code`, `::std::error_condition`, `::std::errc`, `::std::expected`, `::boost::system::error_code` `cert-err33-c <../cert/err33-c.html>`_ is an alias of this check that checks a fixed and large set of standard library functions. |
