brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 07e624e Raw
33 lines · c
1//===----------------------------------------------------------------------===//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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_IGNOREDREMOVERESULTCHECK_H10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_IGNOREDREMOVERESULTCHECK_H11 12#include "../bugprone/UnusedReturnValueCheck.h"13 14namespace clang::tidy::hicpp {15 16/// Ensure that the result of std::remove, std::remove_if and std::unique17/// are not ignored according to rule 17.5.1.18///19/// For the user-facing documentation see:20/// https://clang.llvm.org/extra/clang-tidy/checks/hicpp/ignored-remove-result.html21class IgnoredRemoveResultCheck : public bugprone::UnusedReturnValueCheck {22public:23  IgnoredRemoveResultCheck(StringRef Name, ClangTidyContext *Context);24  bool isLanguageVersionSupported(const LangOptions &LangOpts) const override {25    return LangOpts.CPlusPlus;26  }27  void storeOptions(ClangTidyOptions::OptionMap &Opts) override;28};29 30} // namespace clang::tidy::hicpp31 32#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_IGNOREDREMOVERESULTCHECK_H33