1//===--- IgnoredRemoveResultCheck.cpp - clang-tidy ------------------------===//
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#include "IgnoredRemoveResultCheck.h"
10
11namespace clang::tidy::hicpp {
12
13IgnoredRemoveResultCheck::IgnoredRemoveResultCheck(llvm::StringRef Name,
14 ClangTidyContext *Context)
15 : UnusedReturnValueCheck(Name, Context,
16 "::std::remove;"
17 "::std::remove_if;"
18 "::std::unique") {
19 // The constructor for ClangTidyCheck needs to have been called
20 // before we can access options via Options.get().
21 AllowCastToVoid = Options.get(LocalName: "AllowCastToVoid", Default: true);
22}
23
24void IgnoredRemoveResultCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
25 Options.store(Options&: Opts, LocalName: "AllowCastToVoid", Value: AllowCastToVoid);
26}
27
28} // namespace clang::tidy::hicpp
29

source code of clang-tools-extra/clang-tidy/hicpp/IgnoredRemoveResultCheck.cpp