OLD | NEW |
(Empty) | |
| 1 // Copyright 2011 Google Inc. All Rights Reserved. |
| 2 // Author: ajwong@google.com (Albert Wong) |
| 3 |
| 4 #ifndef DIAGNOSTIC_EMITTER_H_ |
| 5 #define DIAGNOSTIC_EMITTER_H_ |
| 6 |
| 7 #include <string> |
| 8 |
| 9 namespace clang { |
| 10 |
| 11 class CompilerInstance; |
| 12 class Diagnostic; |
| 13 class SourceLocation; |
| 14 |
| 15 class DiagnosticEmitter { |
| 16 public: |
| 17 DiagnosticEmitter(clang::CompilerInstance* instance, |
| 18 const std::string& name); |
| 19 |
| 20 void EmitWarning(clang::SourceLocation loc, const char* raw_error); |
| 21 void EmitError(clang::SourceLocation loc, const char* raw_error); |
| 22 |
| 23 private: |
| 24 std::string name_; |
| 25 clang::CompilerInstance* instance_; |
| 26 clang::Diagnostic* diagnostic_; |
| 27 }; |
| 28 |
| 29 } // namespace clang |
| 30 |
| 31 #endif // DIAGNOSTIC_EMITTER_H_ |
OLD | NEW |