blob: ab65f0609d2bcc4f204bdefa8b743bdca3478d04 [file] [log] [blame]
Ben Hamilton52161a52017-11-13 23:54:31 +00001//===--- 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
17namespace clang {
18namespace tidy {
19namespace 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
29class PropertyDeclarationCheck : public ClangTidyCheck {
30public:
31 PropertyDeclarationCheck(StringRef Name, ClangTidyContext *Context);
32 void registerMatchers(ast_matchers::MatchFinder *Finder) override;
33 void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
34 void storeOptions(ClangTidyOptions::OptionMap &Options) override;
35
36private:
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