 |
|
 |
|
| Files: |
1 |
|
Branches Taken: |
16.7% |
1 / 6 |
| Generated: |
2010-02-10 01:31 |
|
Branches Executed: |
33.3% |
2 / 6 |
| |
|
Line Coverage: |
87.5% |
7 / 8 |
| |
 |
|
 |
1 : //===--- SemaConsumer.h - Abstract interface for AST semantics --*- 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 defines the SemaConsumer class, a subclass of
11 : // ASTConsumer that is used by AST clients that also require
12 : // additional semantic analysis.
13 : //
14 : //===----------------------------------------------------------------------===//
15 : #ifndef LLVM_CLANG_SEMA_SEMACONSUMER_H
16 : #define LLVM_CLANG_SEMA_SEMACONSUMER_H
17 :
18 : #include "clang/AST/ASTConsumer.h"
19 :
20 : namespace clang {
21 : class Sema;
22 :
23 : /// \brief An abstract interface that should be implemented by
24 : /// clients that read ASTs and then require further semantic
25 : /// analysis of the entities in those ASTs.
0: branch 1 not taken
39: branch 2 taken
0: branch 5 not taken
0: branch 6 not taken
0: branch 9 not taken
0: branch 10 not taken
26 39: class SemaConsumer : public ASTConsumer {
27 : public:
28 44: SemaConsumer() {
29 44: ASTConsumer::SemaConsumer = true;
30 44: }
31 :
32 : /// \brief Initialize the semantic consumer with the Sema instance
33 : /// being used to perform semantic analysis on the abstract syntax
34 : /// tree.
35 0: virtual void InitializeSema(Sema &S) {}
36 :
37 : /// \brief Inform the semantic consumer that Sema is no longer available.
38 44: virtual void ForgetSema() {}
39 :
40 : // isa/cast/dyn_cast support
41 4560: static bool classof(const ASTConsumer *Consumer) {
42 4560: return Consumer->SemaConsumer;
43 : }
44 : static bool classof(const SemaConsumer *) { return true; }
45 : };
46 : }
47 :
48 : #endif
Generated: 2010-02-10 01:31 by zcov