clang
3.7.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
work
release_test
rc4
llvm.src
tools
clang
include
clang
Analysis
CodeInjector.h
Go to the documentation of this file.
1
//===-- CodeInjector.h ------------------------------------------*- 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
/// \file
11
/// \brief Defines the clang::CodeInjector interface which is responsible for
12
/// injecting AST of function definitions that may not be available in the
13
/// original source.
14
///
15
//===----------------------------------------------------------------------===//
16
17
#ifndef LLVM_CLANG_ANALYSIS_CODEINJECTOR_H
18
#define LLVM_CLANG_ANALYSIS_CODEINJECTOR_H
19
20
namespace
clang {
21
22
class
Stmt
;
23
class
FunctionDecl;
24
class
ObjCMethodDecl;
25
26
/// \brief CodeInjector is an interface which is responsible for injecting AST
27
/// of function definitions that may not be available in the original source.
28
///
29
/// The getBody function will be called each time the static analyzer examines a
30
/// function call that has no definition available in the current translation
31
/// unit. If the returned statement is not a null pointer, it is assumed to be
32
/// the body of a function which will be used for the analysis. The source of
33
/// the body can be arbitrary, but it is advised to use memoization to avoid
34
/// unnecessary reparsing of the external source that provides the body of the
35
/// functions.
36
class
CodeInjector
{
37
public
:
38
CodeInjector
();
39
virtual
~CodeInjector
();
40
41
virtual
Stmt
*
getBody
(
const
FunctionDecl
*D) = 0;
42
virtual
Stmt
*
getBody
(
const
ObjCMethodDecl
*D) = 0;
43
};
44
}
45
46
#endif
clang::FunctionDecl
Definition:
Decl.h:1524
Stmt
clang::ObjCMethodDecl
Definition:
DeclObjC.h:113
clang::CodeInjector::getBody
virtual Stmt * getBody(const FunctionDecl *D)=0
clang::CodeInjector::~CodeInjector
virtual ~CodeInjector()
Definition:
CodeInjector.cpp:15
clang::CodeInjector::CodeInjector
CodeInjector()
Definition:
CodeInjector.cpp:14
clang::CodeInjector
CodeInjector is an interface which is responsible for injecting AST of function definitions that may ...
Definition:
CodeInjector.h:36
Generated on Mon Aug 31 2015 10:45:14 for clang by
1.8.6