25
25
#include < liblangutil/SourceLocation.h>
26
26
#include < memory>
27
27
28
- using namespace std ;
29
28
using namespace solidity ;
30
29
using namespace solidity ::langutil;
31
30
@@ -37,15 +36,15 @@ ErrorReporter& ErrorReporter::operator=(ErrorReporter const& _errorReporter)
37
36
return *this ;
38
37
}
39
38
40
- void ErrorReporter::warning (ErrorId _error, string const & _description)
39
+ void ErrorReporter::warning (ErrorId _error, std:: string const & _description)
41
40
{
42
41
error (_error, Error::Type::Warning, SourceLocation (), _description);
43
42
}
44
43
45
44
void ErrorReporter::warning (
46
45
ErrorId _error,
47
46
SourceLocation const & _location,
48
- string const & _description
47
+ std:: string const & _description
49
48
)
50
49
{
51
50
error (_error, Error::Type::Warning, _location, _description);
@@ -54,27 +53,27 @@ void ErrorReporter::warning(
54
53
void ErrorReporter::warning (
55
54
ErrorId _error,
56
55
SourceLocation const & _location,
57
- string const & _description,
56
+ std:: string const & _description,
58
57
SecondarySourceLocation const & _secondaryLocation
59
58
)
60
59
{
61
60
error (_error, Error::Type::Warning, _location, _secondaryLocation, _description);
62
61
}
63
62
64
- void ErrorReporter::error (ErrorId _errorId, Error::Type _type, SourceLocation const & _location, string const & _description)
63
+ void ErrorReporter::error (ErrorId _errorId, Error::Type _type, SourceLocation const & _location, std:: string const & _description)
65
64
{
66
65
if (checkForExcessiveErrors (_type))
67
66
return ;
68
67
69
- m_errorList.push_back (make_shared<Error>(_errorId, _type, _description, _location));
68
+ m_errorList.push_back (std:: make_shared<Error>(_errorId, _type, _description, _location));
70
69
}
71
70
72
- void ErrorReporter::error (ErrorId _errorId, Error::Type _type, SourceLocation const & _location, SecondarySourceLocation const & _secondaryLocation, string const & _description)
71
+ void ErrorReporter::error (ErrorId _errorId, Error::Type _type, SourceLocation const & _location, SecondarySourceLocation const & _secondaryLocation, std:: string const & _description)
73
72
{
74
73
if (checkForExcessiveErrors (_type))
75
74
return ;
76
75
77
- m_errorList.push_back (make_shared<Error>(_errorId, _type, _description, _location, _secondaryLocation));
76
+ m_errorList.push_back (std:: make_shared<Error>(_errorId, _type, _description, _location, _secondaryLocation));
78
77
}
79
78
80
79
bool ErrorReporter::hasExcessiveErrors () const
@@ -89,7 +88,7 @@ bool ErrorReporter::checkForExcessiveErrors(Error::Type _type)
89
88
m_warningCount++;
90
89
91
90
if (m_warningCount == c_maxWarningsAllowed)
92
- m_errorList.push_back (make_shared<Error>(4591_error, Error::Type::Warning, " There are more than 256 warnings. Ignoring the rest." ));
91
+ m_errorList.push_back (std:: make_shared<Error>(4591_error, Error::Type::Warning, " There are more than 256 warnings. Ignoring the rest." ));
93
92
94
93
if (m_warningCount >= c_maxWarningsAllowed)
95
94
return true ;
@@ -99,7 +98,7 @@ bool ErrorReporter::checkForExcessiveErrors(Error::Type _type)
99
98
m_infoCount++;
100
99
101
100
if (m_infoCount == c_maxInfosAllowed)
102
- m_errorList.push_back (make_shared<Error>(2833_error, Error::Type::Info, " There are more than 256 infos. Ignoring the rest." ));
101
+ m_errorList.push_back (std:: make_shared<Error>(2833_error, Error::Type::Info, " There are more than 256 infos. Ignoring the rest." ));
103
102
104
103
if (m_infoCount >= c_maxInfosAllowed)
105
104
return true ;
@@ -110,21 +109,21 @@ bool ErrorReporter::checkForExcessiveErrors(Error::Type _type)
110
109
111
110
if (m_errorCount > c_maxErrorsAllowed)
112
111
{
113
- m_errorList.push_back (make_shared<Error>(4013_error, Error::Type::Warning, " There are more than 256 errors. Aborting." ));
112
+ m_errorList.push_back (std:: make_shared<Error>(4013_error, Error::Type::Warning, " There are more than 256 errors. Aborting." ));
114
113
BOOST_THROW_EXCEPTION (FatalError ());
115
114
}
116
115
}
117
116
118
117
return false ;
119
118
}
120
119
121
- void ErrorReporter::fatalError (ErrorId _error, Error::Type _type, SourceLocation const & _location, SecondarySourceLocation const & _secondaryLocation, string const & _description)
120
+ void ErrorReporter::fatalError (ErrorId _error, Error::Type _type, SourceLocation const & _location, SecondarySourceLocation const & _secondaryLocation, std:: string const & _description)
122
121
{
123
122
error (_error, _type, _location, _secondaryLocation, _description);
124
123
BOOST_THROW_EXCEPTION (FatalError ());
125
124
}
126
125
127
- void ErrorReporter::fatalError (ErrorId _error, Error::Type _type, SourceLocation const & _location, string const & _description)
126
+ void ErrorReporter::fatalError (ErrorId _error, Error::Type _type, SourceLocation const & _location, std:: string const & _description)
128
127
{
129
128
error (_error, _type, _location, _description);
130
129
BOOST_THROW_EXCEPTION (FatalError ());
@@ -140,7 +139,7 @@ void ErrorReporter::clear()
140
139
m_errorList.clear ();
141
140
}
142
141
143
- void ErrorReporter::declarationError (ErrorId _error, SourceLocation const & _location, SecondarySourceLocation const & _secondaryLocation, string const & _description)
142
+ void ErrorReporter::declarationError (ErrorId _error, SourceLocation const & _location, SecondarySourceLocation const & _secondaryLocation, std:: string const & _description)
144
143
{
145
144
error (
146
145
_error,
@@ -151,7 +150,7 @@ void ErrorReporter::declarationError(ErrorId _error, SourceLocation const& _loca
151
150
);
152
151
}
153
152
154
- void ErrorReporter::declarationError (ErrorId _error, SourceLocation const & _location, string const & _description)
153
+ void ErrorReporter::declarationError (ErrorId _error, SourceLocation const & _location, std:: string const & _description)
155
154
{
156
155
error (
157
156
_error,
@@ -170,7 +169,7 @@ void ErrorReporter::fatalDeclarationError(ErrorId _error, SourceLocation const&
170
169
_description);
171
170
}
172
171
173
- void ErrorReporter::parserError (ErrorId _error, SourceLocation const & _location, string const & _description)
172
+ void ErrorReporter::parserError (ErrorId _error, SourceLocation const & _location, std:: string const & _description)
174
173
{
175
174
error (
176
175
_error,
@@ -180,7 +179,7 @@ void ErrorReporter::parserError(ErrorId _error, SourceLocation const& _location,
180
179
);
181
180
}
182
181
183
- void ErrorReporter::fatalParserError (ErrorId _error, SourceLocation const & _location, string const & _description)
182
+ void ErrorReporter::fatalParserError (ErrorId _error, SourceLocation const & _location, std:: string const & _description)
184
183
{
185
184
fatalError (
186
185
_error,
@@ -190,7 +189,7 @@ void ErrorReporter::fatalParserError(ErrorId _error, SourceLocation const& _loca
190
189
);
191
190
}
192
191
193
- void ErrorReporter::syntaxError (ErrorId _error, SourceLocation const & _location, string const & _description)
192
+ void ErrorReporter::syntaxError (ErrorId _error, SourceLocation const & _location, std:: string const & _description)
194
193
{
195
194
error (
196
195
_error,
@@ -200,7 +199,7 @@ void ErrorReporter::syntaxError(ErrorId _error, SourceLocation const& _location,
200
199
);
201
200
}
202
201
203
- void ErrorReporter::typeError (ErrorId _error, SourceLocation const & _location, SecondarySourceLocation const & _secondaryLocation, string const & _description)
202
+ void ErrorReporter::typeError (ErrorId _error, SourceLocation const & _location, SecondarySourceLocation const & _secondaryLocation, std:: string const & _description)
204
203
{
205
204
error (
206
205
_error,
@@ -211,7 +210,7 @@ void ErrorReporter::typeError(ErrorId _error, SourceLocation const& _location, S
211
210
);
212
211
}
213
212
214
- void ErrorReporter::typeError (ErrorId _error, SourceLocation const & _location, string const & _description)
213
+ void ErrorReporter::typeError (ErrorId _error, SourceLocation const & _location, std:: string const & _description)
215
214
{
216
215
error (
217
216
_error,
@@ -222,7 +221,7 @@ void ErrorReporter::typeError(ErrorId _error, SourceLocation const& _location, s
222
221
}
223
222
224
223
225
- void ErrorReporter::fatalTypeError (ErrorId _error, SourceLocation const & _location, SecondarySourceLocation const & _secondaryLocation, string const & _description)
224
+ void ErrorReporter::fatalTypeError (ErrorId _error, SourceLocation const & _location, SecondarySourceLocation const & _secondaryLocation, std:: string const & _description)
226
225
{
227
226
fatalError (
228
227
_error,
@@ -233,7 +232,7 @@ void ErrorReporter::fatalTypeError(ErrorId _error, SourceLocation const& _locati
233
232
);
234
233
}
235
234
236
- void ErrorReporter::fatalTypeError (ErrorId _error, SourceLocation const & _location, string const & _description)
235
+ void ErrorReporter::fatalTypeError (ErrorId _error, SourceLocation const & _location, std:: string const & _description)
237
236
{
238
237
fatalError (
239
238
_error,
@@ -243,7 +242,7 @@ void ErrorReporter::fatalTypeError(ErrorId _error, SourceLocation const& _locati
243
242
);
244
243
}
245
244
246
- void ErrorReporter::docstringParsingError (ErrorId _error, SourceLocation const & _location, string const & _description)
245
+ void ErrorReporter::docstringParsingError (ErrorId _error, SourceLocation const & _location, std:: string const & _description)
247
246
{
248
247
error (
249
248
_error,
@@ -256,13 +255,13 @@ void ErrorReporter::docstringParsingError(ErrorId _error, SourceLocation const&
256
255
void ErrorReporter::info (
257
256
ErrorId _error,
258
257
SourceLocation const & _location,
259
- string const & _description
258
+ std:: string const & _description
260
259
)
261
260
{
262
261
error (_error, Error::Type::Info, _location, _description);
263
262
}
264
263
265
- void ErrorReporter::info (ErrorId _error, string const & _description)
264
+ void ErrorReporter::info (ErrorId _error, std:: string const & _description)
266
265
{
267
266
error (_error, Error::Type::Info, SourceLocation (), _description);
268
267
}
0 commit comments