clang-tools  6.0.0
PropertyDeclarationCheck.h
Go to the documentation of this file.
1 //===--- PropertyDeclarationCheck.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_OBJC_PROPERTY_DECLARATION_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OBJC_PROPERTY_DECLARATION_H
12 
13 #include "../ClangTidy.h"
14 #include <string>
15 #include <vector>
16 
17 namespace clang {
18 namespace tidy {
19 namespace objc {
20 
21 /// Finds Objective-C property declarations which
22 /// are not in Lower Camel Case.
23 ///
24 /// The format of property should look like:
25 /// @property(nonatomic) NSString *lowerCamelCase;
26 ///
27 /// For the user-facing documentation see:
28 /// http://clang.llvm.org/extra/clang-tidy/checks/objc-property-declaration.html
30 public:
31  PropertyDeclarationCheck(StringRef Name, ClangTidyContext *Context);
32  void registerMatchers(ast_matchers::MatchFinder *Finder) override;
33  void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
35 
36 private:
37  const std::vector<std::string> SpecialAcronyms;
38 };
39 
40 } // namespace objc
41 } // namespace tidy
42 } // namespace clang
43 
44 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OBJC_PROPERTY_DECLARATION_H
PropertyDeclarationCheck(StringRef Name, ClangTidyContext *Context)
void storeOptions(ClangTidyOptions::OptionMap &Options) override
Should store all options supported by this check with their current values or default values for opti...
StringHandle Name
Base class for all clang-tidy checks.
Definition: ClangTidy.h:127
std::map< std::string, std::string > OptionMap
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.