1 //===--- Analyzer.h - Analysis for indexing information ---------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the Analyzer interface.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_INDEX_ANALYZER_H
15 #define LLVM_CLANG_INDEX_ANALYZER_H
19 class ObjCMessageExpr;
24 class TULocationHandler;
26 /// \brief Provides indexing information, like finding all references of an
27 /// Entity across translation units.
32 Analyzer(const Analyzer&); // do not implement
33 Analyzer &operator=(const Analyzer &); // do not implement
36 explicit Analyzer(Program &prog, IndexProvider &idxer)
37 : Prog(prog), Idxer(idxer) { }
39 /// \brief Find all TULocations for declarations of the given Decl and pass
41 void FindDeclarations(Decl *D, TULocationHandler &Handler);
43 /// \brief Find all TULocations for references of the given Decl and pass
45 void FindReferences(Decl *D, TULocationHandler &Handler);
47 /// \brief Find methods that may respond to the given message and pass them
49 void FindObjCMethods(ObjCMessageExpr *MsgE, TULocationHandler &Handler);