Accessors for exceptions.

This commit is contained in:
chriseth
2021-12-01 14:26:23 +01:00
parent cc2a8609d6
commit b6bd85202c
7 changed files with 20 additions and 8 deletions
+4 -1
View File
@@ -197,6 +197,9 @@ public:
Type type() const { return m_type; }
std::string const& typeName() const { return m_typeName; }
SourceLocation const* sourceLocation() const noexcept;
SecondarySourceLocation const* secondarySourceLocation() const noexcept;
/// helper functions
static Error const* containsErrorOfType(ErrorList const& _list, Error::Type _type)
{
@@ -206,7 +209,7 @@ public:
return nullptr;
}
static Severity errorSeverity(Type _type)
static constexpr Severity errorSeverity(Type _type)
{
if (_type == Type::Info)
return Severity::Info;