]> CyberLeo.Net >> Repos - FreeBSD/releng/9.0.git/blob - contrib/llvm/tools/clang/include/clang/Index/Analyzer.h
Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
[FreeBSD/releng/9.0.git] / contrib / llvm / tools / clang / include / clang / Index / Analyzer.h
1 //===--- Analyzer.h - Analysis for indexing information ---------*- 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 // This file declares the Analyzer interface.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_CLANG_INDEX_ANALYZER_H
15 #define LLVM_CLANG_INDEX_ANALYZER_H
16
17 namespace clang {
18   class Decl;
19   class ObjCMessageExpr;
20
21 namespace idx {
22   class Program;
23   class IndexProvider;
24   class TULocationHandler;
25
26 /// \brief Provides indexing information, like finding all references of an
27 /// Entity across translation units.
28 class Analyzer {
29   Program &Prog;
30   IndexProvider &Idxer;
31
32   Analyzer(const Analyzer&); // do not implement
33   Analyzer &operator=(const Analyzer &); // do not implement
34
35 public:
36   explicit Analyzer(Program &prog, IndexProvider &idxer)
37     : Prog(prog), Idxer(idxer) { }
38
39   /// \brief Find all TULocations for declarations of the given Decl and pass
40   /// them to Handler.
41   void FindDeclarations(Decl *D, TULocationHandler &Handler);
42
43   /// \brief Find all TULocations for references of the given Decl and pass
44   /// them to Handler.
45   void FindReferences(Decl *D, TULocationHandler &Handler);
46
47   /// \brief Find methods that may respond to the given message and pass them
48   /// to Handler.
49   void FindObjCMethods(ObjCMessageExpr *MsgE, TULocationHandler &Handler);
50 };
51
52 } // namespace idx
53
54 } // namespace clang
55
56 #endif