souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
31 class DiagnosticMessage {
51 void print(std::ostream& out)
const {
60 diagnosticMessage.print(out);
93 void print(std::ostream& out)
const {
97 out << additionalMessage;
102 diagnostic.
print(out);
154 [](
Diagnostic d) ->
bool { return d.getType() == Diagnostic::Type::ERROR; });
159 [](
Diagnostic d) ->
bool { return d.getType() == Diagnostic::Type::WARNING; });
189 std::cerr << *
this <<
getNumErrors() <<
" errors generated, evaluation aborted\n";
193 void print(std::ostream& out)
const {
const DiagnosticMessage & getPrimaryMessage() const
friend std::ostream & operator<<(std::ostream &out, const DiagnosticMessage &diagnosticMessage)
unsigned getNumWarnings() const
friend std::ostream & operator<<(std::ostream &out, const Diagnostic &diagnostic)
ErrorReport(bool nowarn=false)
void print(std::ostream &out) const
unsigned getNumIssues() const
DiagnosticMessage(std::string message, SrcLocation location)
void addError(const std::string &message, SrcLocation location)
Adds an error with the given message and location.
void print(std::ostream &out) const
unsigned getNumErrors() const
Diagnostic(Type type, DiagnosticMessage primaryMessage, std::vector< DiagnosticMessage > additionalMessages)
void print(std::ostream &out) const
friend std::ostream & operator<<(std::ostream &out, const ErrorReport &report)
bool operator<(const Diagnostic &other) const
const std::string & getMessage() const
A class describing a range in an input file.
std::vector< DiagnosticMessage > additionalMessages
std::set< Diagnostic > diagnostics
void addWarning(const std::string &message, SrcLocation location)
Adds a warning with the given message and location.
const std::vector< DiagnosticMessage > & getAdditionalMessages() const
void addDiagnostic(const Diagnostic &diagnostic)
DiagnosticMessage primaryMessage
const SrcLocation & getLocation() const
std::string extloc() const
An extended string describing this location in a end-user friendly way.