OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef TOOL_CLANG_BINDMIGRATE_DIAGNOSTIC_EMITTER_H_ |
| 6 #define TOOL_CLANG_BINDMIGRATE_DIAGNOSTIC_EMITTER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 namespace clang { |
| 11 |
| 12 class CompilerInstance; |
| 13 class Diagnostic; |
| 14 class SourceLocation; |
| 15 |
| 16 class DiagnosticEmitter { |
| 17 public: |
| 18 DiagnosticEmitter(clang::CompilerInstance* instance, |
| 19 const std::string& name); |
| 20 |
| 21 void EmitWarning(clang::SourceLocation loc, const char* raw_error); |
| 22 void EmitError(clang::SourceLocation loc, const char* raw_error); |
| 23 |
| 24 private: |
| 25 std::string name_; |
| 26 clang::CompilerInstance* instance_; |
| 27 clang::Diagnostic* diagnostic_; |
| 28 }; |
| 29 |
| 30 } // namespace clang |
| 31 |
| 32 #endif // TOOL_CLANG_BINDMIGRATE_DIAGNOSTIC_EMITTER_H_ |
OLD | NEW |