 |
|
 |
|
| Files: |
1 |
|
Branches Taken: |
66.7% |
2 / 3 |
| Generated: |
2010-02-10 01:31 |
|
Branches Executed: |
66.7% |
2 / 3 |
| |
|
Line Coverage: |
100.0% |
7 / 7 |
| |
 |
|
 |
1 : //===--- TextDiagnosticBuffer.h - Buffer Text Diagnostics -------*- 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 is a concrete diagnostic client, which buffers the diagnostic messages.
11 : //
12 : //===----------------------------------------------------------------------===//
13 :
14 : #ifndef LLVM_CLANG_FRONTEND_TEXT_DIAGNOSTIC_BUFFER_H_
15 : #define LLVM_CLANG_FRONTEND_TEXT_DIAGNOSTIC_BUFFER_H_
16 :
17 : #include "clang/Basic/Diagnostic.h"
18 : #include <vector>
19 :
20 : namespace clang {
21 :
22 : class Preprocessor;
23 : class SourceManager;
24 :
5248: branch 4 taken
2514: branch 5 taken
0: branch 12 not taken
25 15524: class TextDiagnosticBuffer : public DiagnosticClient {
26 : public:
27 : typedef std::vector<std::pair<SourceLocation, std::string> > DiagList;
28 : typedef DiagList::iterator iterator;
29 : typedef DiagList::const_iterator const_iterator;
30 : private:
31 : DiagList Errors, Warnings, Notes;
32 : public:
33 6450: const_iterator err_begin() const { return Errors.begin(); }
34 6450: const_iterator err_end() const { return Errors.end(); }
35 :
36 6450: const_iterator warn_begin() const { return Warnings.begin(); }
37 6450: const_iterator warn_end() const { return Warnings.end(); }
38 :
39 6450: const_iterator note_begin() const { return Notes.begin(); }
40 6450: const_iterator note_end() const { return Notes.end(); }
41 :
42 : virtual void HandleDiagnostic(Diagnostic::Level DiagLevel,
43 : const DiagnosticInfo &Info);
44 :
45 : /// FlushDiagnostics - Flush the buffered diagnostics to an given
46 : /// diagnostic engine.
47 : void FlushDiagnostics(Diagnostic &Diags) const;
48 : };
49 :
50 : } // end namspace clang
51 :
52 : #endif
Generated: 2010-02-10 01:31 by zcov