Lunderberg opened a new pull request, #13542:
URL: https://github.com/apache/tvm/pull/13542

   Using `LOG(FATAL) << "some error message";` throws an exception when the 
internal `LogFatal` object is constructed.  However, the gcc warning "control 
reaches end of non-void function" resulted in a common pattern where a 
`LOG(FATAL)` statement was immediately followed by return of a default value, 
in order to suppress the warning.
   
   This commit marks the `LogFatal::~LogFatal` destructor with the C++11 
attribute `[[noreturn]]`, indicating that calls into it will not resume the 
normal control flow.  This suppresses the warning without requiring the extra 
`return` statement after `LOG(FATAL)`, as the compiler knows that control flow 
will not resume after `LOG(FATAL)`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to