clang-tools 20.0.0git
IgnoredRemoveResultCheck.h
Go to the documentation of this file.
1//===--- IgnoredRemoveResultCheck.h - clang-tidy ----------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_IGNOREDREMOVERESULTCHECK_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_IGNOREDREMOVERESULTCHECK_H
11
12#include "../bugprone/UnusedReturnValueCheck.h"
13
14namespace clang::tidy::hicpp {
15
16/// Ensure that the result of std::remove, std::remove_if and std::unique
17/// are not ignored according to rule 17.5.1.
18///
19/// For the user-facing documentation see:
20/// http://clang.llvm.org/extra/clang-tidy/checks/hicpp/ignored-remove-result.html
22public:
24 void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
25};
26
27} // namespace clang::tidy::hicpp
28
29#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_IGNOREDREMOVERESULTCHECK_H
llvm::SmallString< 256U > Name
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
Detects function calls where the return value is unused.
Ensure that the result of std::remove, std::remove_if and std::unique are not ignored according to ru...
void storeOptions(ClangTidyOptions::OptionMap &Opts) override
Should store all options supported by this check with their current values or default values for opti...
llvm::StringMap< ClangTidyValue > OptionMap