clang-tools  8.0.0
FunctionNamingCheck.h
Go to the documentation of this file.
1 //===--- FunctionNamingCheck.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_GOOGLE_OBJC_FUNCTION_NAMING_CHECK_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_OBJC_FUNCTION_NAMING_CHECK_H
12 
13 #include "../ClangTidy.h"
14 #include "llvm/ADT/StringRef.h"
15 
16 namespace clang {
17 namespace tidy {
18 namespace google {
19 namespace objc {
20 
21 /// Finds function names that do not conform to the recommendations of the
22 /// Google Objective-C Style Guide. Function names should be in upper camel case
23 /// including capitalized acronyms and initialisms. Functions that are not of
24 /// static storage class must also have an appropriate prefix. The function
25 /// `main` is an exception. Note that this check does not apply to Objective-C
26 /// method or property declarations.
27 ///
28 /// For the user-facing documentation see:
29 /// http://clang.llvm.org/extra/clang-tidy/checks/google-objc-function-naming.html
31 public:
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 objc
39 } // namespace google
40 } // namespace tidy
41 } // namespace clang
42 
43 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_OBJC_FUNCTION_NAMING_CHECK_H
Finds function names that do not conform to the recommendations of the Google Objective-C Style Guide...
Base class for all clang-tidy checks.
Definition: ClangTidy.h:127
FunctionNamingCheck(StringRef Name, ClangTidyContext *Context)
static constexpr llvm::StringLiteral Name
llvm::Optional< llvm::Expected< tooling::AtomicChanges > > Result
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.