ccls/libclangmm/Diagnostic.h

37 lines
824 B
C
Raw Normal View History

2017-02-18 19:37:24 +00:00
#if false
2017-02-16 09:35:30 +00:00
#ifndef DIAGNOSTIC_H_
#define DIAGNOSTIC_H_
#include <string>
#include <vector>
#include <clang-c/Index.h>
#include "SourceRange.h"
namespace clang {
2017-02-17 09:57:44 +00:00
class Diagnostic {
friend class TranslationUnit;
Diagnostic(CXTranslationUnit& cx_tu, CXDiagnostic& cx_diagnostic);
public:
class FixIt {
public:
FixIt(const std::string &source, const std::pair<clang::Offset, clang::Offset> &offsets) :
source(source), offsets(offsets) {}
std::string source;
2017-02-16 09:35:30 +00:00
std::pair<clang::Offset, clang::Offset> offsets;
};
2017-02-17 09:57:44 +00:00
static const std::string get_severity_spelling(unsigned severity);
unsigned severity;
std::string severity_spelling;
std::string spelling;
std::string path;
std::pair<clang::Offset, clang::Offset> offsets;
std::vector<FixIt> fix_its;
};
}
2017-02-16 09:35:30 +00:00
#endif // DIAGNOSTIC_H_
2017-02-18 19:37:24 +00:00
#endif