blob: 05e60e20842519025a6dbd6317d9b95a6e22af6c [file] [log] [blame]
Felix Berger3c8edde2016-03-29 02:42:38 +00001//===--- UnnecessaryValueParamCheck.h - clang-tidy---------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_UNNECESSARY_VALUE_PARAM_H
11#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_UNNECESSARY_VALUE_PARAM_H
12
13#include "../ClangTidy.h"
14
15namespace clang {
16namespace tidy {
17namespace performance {
18
19/// \brief A check that flags value parameters of expensive to copy types that
20/// can safely be converted to const references.
21///
22/// For the user-facing documentation see:
23/// http://clang.llvm.org/extra/clang-tidy/checks/performance-unnecessary-value-param.html
24class UnnecessaryValueParamCheck : public ClangTidyCheck {
25public:
26 UnnecessaryValueParamCheck(StringRef Name, ClangTidyContext *Context)
27 : ClangTidyCheck(Name, Context) {}
28 void registerMatchers(ast_matchers::MatchFinder *Finder) override;
29 void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
30};
31
32} // namespace performance
33} // namespace tidy
34} // namespace clang
35
36#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_PERFORMANCE_UNNECESSARY_VALUE_PARAM_H