aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Checker/DomainSpecific/CocoaConventions.h
blob: e9b613349dd441f3362bed3c1595c2d10942db99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//===- CocoaConventions.h - Special handling of Cocoa conventions -*- C++ -*--//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines 
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_CHECKER_DS_COCOA
#define LLVM_CLANG_CHECKER_DS_COCOA

#include "clang/Basic/IdentifierTable.h"

namespace clang {
namespace cocoa {
 
enum NamingConvention { NoConvention, CreateRule, InitRule };

NamingConvention deriveNamingConvention(Selector S);

static inline bool followsFundamentalRule(Selector S) {
  return deriveNamingConvention(S) == CreateRule;
}

}}

#endif