Minor formatting change in merge so [[noreturn]] is consistently
on same line as function declarations.

* 'noreturn' of https://github.com/MaxKellermann/zeek:
  threading/MsgThread: add [[noreturn]] to InternalError()
  Flare: add [[noreturn]] to bad_pipe_op()
  Obj: add [[noreturn]] attributes to Internal(),  bad_ref()
  Reporter: add [[noreturn]] attribute to several methods
This commit is contained in:
Jon Siwek 2020-02-21 15:29:45 -08:00
commit 3996a54302
6 changed files with 18 additions and 8 deletions

10
CHANGES
View file

@ -1,4 +1,14 @@
3.2.0-dev.85 | 2020-02-21 15:29:45 -0800
* threading/MsgThread: add [[noreturn]] to InternalError() (Max Kellermann)
* Flare: add [[noreturn]] to bad_pipe_op() (Max Kellermann)
* Obj: add [[noreturn]] attributes to Internal(), bad_ref() (Max Kellermann)
* Reporter: add [[noreturn]] attribute to several methods (Max Kellermann)
3.2.0-dev.80 | 2020-02-21 10:14:05 -0800
* OpaqueVal: remove misplaced `virtual` keywords (Max Kellermann)

View file

@ -1 +1 @@
3.2.0-dev.80
3.2.0-dev.85

View file

@ -13,7 +13,7 @@ Flare::Flare()
{
}
static void bad_pipe_op(const char* which, bool signal_safe)
[[noreturn]] static void bad_pipe_op(const char* which, bool signal_safe)
{
if ( signal_safe )
abort();

View file

@ -93,7 +93,7 @@ public:
BadTag(text, tag_to_text_func(t1), tag_to_text_func(t2)); \
}
void Internal(const char* msg) const;
[[noreturn]] void Internal(const char* msg) const;
void InternalWarning(const char* msg) const;
virtual void Describe(ODesc* d) const { /* FIXME: Add code */ };
@ -152,7 +152,7 @@ private:
// Prints obj to stderr, primarily for debugging.
extern void print(const BroObj* obj);
extern void bad_ref(int type);
[[noreturn]] extern void bad_ref(int type);
// Sometimes useful when dealing with BroObj subclasses that have their
// own (protected) versions of Error.

View file

@ -66,11 +66,11 @@ public:
// Report a fatal error. Bro will terminate after the message has been
// reported.
void FatalError(const char* fmt, ...) FMT_ATTR;
[[noreturn]] void FatalError(const char* fmt, ...) FMT_ATTR;
// Report a fatal error. Bro will terminate after the message has been
// reported and always generate a core dump.
void FatalErrorWithCore(const char* fmt, ...) FMT_ATTR;
[[noreturn]] void FatalErrorWithCore(const char* fmt, ...) FMT_ATTR;
// Report a runtime error in evaluating a Bro script expression. This
// function will not return but raise an InterpreterException.
@ -97,7 +97,7 @@ public:
// Report an internal program error. Bro will terminate with a core
// dump after the message has been reported.
void InternalError(const char* fmt, ...) FMT_ATTR;
[[noreturn]] void InternalError(const char* fmt, ...) FMT_ATTR;
// Report an analyzer error. That analyzer will be set to not process
// any further input, but Bro otherwise continues normally.

View file

@ -144,7 +144,7 @@ public:
*
* @param msg The message. It will be prefixed with the thread's name.
*/
void InternalError(const char* msg);
[[noreturn]] void InternalError(const char* msg);
#ifdef DEBUG
/**