-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClangError.h
42 lines (37 loc) · 972 Bytes
/
ClangError.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once
#include <string>
#include <vector>
using std::string;
/**
* Wrapper for handling compiler results/errors
* and for extracting useful data for errors.
*/
class ClangError {
public:
ClangError(){/* Nothing */};
ClangError(string stderr);
/**
* Internal structure for keeping track of errors
*/
class ERR {
public:
ERR(){/* Nothing */};
/* Generalized assignment constructor */
ERR(string _file, string _row, string _column,
string _type, string _details)
: file(_file), row(_row), column(_column), type(_type), details(_details){/* Nothing */};
string file;
string row;
string column;
string type;
string details;
};
/**
* Getter method for returning vector of errors.
*/
std::vector<ERR> getErrors();
private:
/* Internal class storage */
std::vector<ERR> __errors;
};
#include "ClangError.cpp"