Mark RuntimeError methods in Reporter as noreturn since they throw exceptions

This commit is contained in:
Tim Wojtulewicz 2020-03-24 12:48:26 -07:00
parent b0b1fffe3e
commit b51879da83
2 changed files with 6 additions and 5 deletions

View file

@ -218,9 +218,10 @@ protected:
// TYPE_ERROR.
void ExprError(const char msg[]);
void RuntimeError(const std::string& msg) const;
void RuntimeErrorWithCallStack(const std::string& msg) const;
// These two functions both call Reporter::RuntimeError or Reporter::ExprRuntimeError,
// both of which are marked as [[noreturn]].
[[noreturn]] void RuntimeError(const std::string& msg) const;
[[noreturn]] void RuntimeErrorWithCallStack(const std::string& msg) const;
BroExprTag tag;
IntrusivePtr<BroType> type;