clang  6.0.0svn
SelectorLocationsKind.h
Go to the documentation of this file.
1 //===--- SelectorLocationsKind.h - Kind of selector locations ---*- 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 // Describes whether the identifier locations for a selector are "standard"
11 // or not.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_CLANG_AST_SELECTORLOCATIONSKIND_H
16 #define LLVM_CLANG_AST_SELECTORLOCATIONSKIND_H
17 
18 #include "clang/Basic/LLVM.h"
19 
20 namespace clang {
21  class Selector;
22  class SourceLocation;
23  class Expr;
24  class ParmVarDecl;
25 
26 /// \brief Whether all locations of the selector identifiers are in a
27 /// "standard" position.
29  /// \brief Non-standard.
31 
32  /// \brief For nullary selectors, immediately before the end:
33  /// "[foo release]" / "-(void)release;"
34  /// Or immediately before the arguments:
35  /// "[foo first:1 second:2]" / "-(id)first:(int)x second:(int)y;
37 
38  /// \brief For nullary selectors, immediately before the end:
39  /// "[foo release]" / "-(void)release;"
40  /// Or with a space between the arguments:
41  /// "[foo first: 1 second: 2]" / "-(id)first: (int)x second: (int)y;
43 };
44 
45 /// \brief Returns true if all \p SelLocs are in a "standard" location.
48  ArrayRef<Expr *> Args,
49  SourceLocation EndLoc);
50 
51 /// \brief Get the "standard" location of a selector identifier, e.g:
52 /// For nullary selectors, immediately before ']': "[foo release]"
53 ///
54 /// \param WithArgSpace if true the standard location is with a space apart
55 /// before arguments: "[foo first: 1 second: 2]"
56 /// If false: "[foo first:1 second:2]"
58  Selector Sel,
59  bool WithArgSpace,
60  ArrayRef<Expr *> Args,
61  SourceLocation EndLoc);
62 
63 /// \brief Returns true if all \p SelLocs are in a "standard" location.
67  SourceLocation EndLoc);
68 
69 /// \brief Get the "standard" location of a selector identifier, e.g:
70 /// For nullary selectors, immediately before ']': "[foo release]"
71 ///
72 /// \param WithArgSpace if true the standard location is with a space apart
73 /// before arguments: "-(id)first: (int)x second: (int)y;"
74 /// If false: "-(id)first:(int)x second:(int)y;"
76  Selector Sel,
77  bool WithArgSpace,
79  SourceLocation EndLoc);
80 
81 } // end namespace clang
82 
83 #endif
For nullary selectors, immediately before the end: "[foo release]" / "-(void)release;" Or with a spac...
Smart pointer class that efficiently represents Objective-C method names.
SelectorLocationsKind
Whether all locations of the selector identifiers are in a "standard" position.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
SourceLocation getStandardSelectorLoc(unsigned Index, Selector Sel, bool WithArgSpace, ArrayRef< Expr *> Args, SourceLocation EndLoc)
Get the "standard" location of a selector identifier, e.g: For nullary selectors, immediately before ...
Encodes a location in the source.
Dataflow Directional Tag Classes.
For nullary selectors, immediately before the end: "[foo release]" / "-(void)release;" Or immediately...
SelectorLocationsKind hasStandardSelectorLocs(Selector Sel, ArrayRef< SourceLocation > SelLocs, ArrayRef< Expr *> Args, SourceLocation EndLoc)
Returns true if all SelLocs are in a "standard" location.