clang-tools
6.0.0
llvm.src
tools
clang
tools
extra
clang-tidy
readability
NamedParameterCheck.h
Go to the documentation of this file.
1
//===--- NamedParameterCheck.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_READABILITY_NAMEDPARAMETERCHECK_H
11
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_NAMEDPARAMETERCHECK_H
12
13
#include "../ClangTidy.h"
14
15
namespace
clang
{
16
namespace
tidy {
17
namespace
readability {
18
19
/// Find functions with unnamed arguments.
20
///
21
/// The check implements the following rule originating in the Google C++ Style
22
/// Guide:
23
///
24
/// https://google.github.io/styleguide/cppguide.html#Function_Declarations_and_Definitions
25
///
26
/// All parameters should be named, with identical names in the declaration and
27
/// implementation.
28
///
29
/// Corresponding cpplint.py check name: 'readability/function'.
30
class
NamedParameterCheck
:
public
ClangTidyCheck
{
31
public
:
32
NamedParameterCheck
(StringRef
Name
,
ClangTidyContext
*Context)
33
:
ClangTidyCheck
(Name, Context) {}
34
void
registerMatchers
(ast_matchers::MatchFinder *Finder)
override
;
35
void
check
(
const
ast_matchers::MatchFinder::MatchResult &Result)
override
;
36
};
37
38
}
// namespace readability
39
}
// namespace tidy
40
}
// namespace clang
41
42
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_NAMEDPARAMETERCHECK_H
Name
StringHandle Name
Definition:
PreprocessorTracker.cpp:525
clang::tidy::readability::NamedParameterCheck::check
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
Definition:
NamedParameterCheck.cpp:25
clang::tidy::ClangTidyCheck
Base class for all clang-tidy checks.
Definition:
ClangTidy.h:127
clang::tidy::readability::NamedParameterCheck::NamedParameterCheck
NamedParameterCheck(StringRef Name, ClangTidyContext *Context)
Definition:
NamedParameterCheck.h:32
clang::tidy::readability::NamedParameterCheck::registerMatchers
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.
Definition:
NamedParameterCheck.cpp:21
clang
Definition:
AndroidTidyModule.cpp:28
clang::tidy::readability::NamedParameterCheck
Find functions with unnamed arguments.
Definition:
NamedParameterCheck.h:30
clang::tidy::ClangTidyContext
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
Definition:
ClangTidyDiagnosticConsumer.h:104
Generated on Thu Feb 8 2018 09:13:45 for clang-tools by
1.8.13