File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -297,26 +297,17 @@ void CheckExceptionSafety::nothrowThrows()
297297 continue ;
298298
299299 bool isNoExcept = false , isEntryPoint = false ;
300-
301- // check noexcept and noexcept(true) functions
302- if (function->isNoExcept ()) {
303- isNoExcept = true ;
304- }
305-
306- // check throw() functions
307- else if (function->isThrow () && !function->throwArg ) {
308- isNoExcept = true ;
309- }
310-
311- // check __attribute__((nothrow)) or __declspec(nothrow) functions
312- else if (function->isAttributeNothrow ()) {
300+ if (function->isNoExcept () || // noexcept and noexcept(true) functions
301+ (function->isThrow () && !function->throwArg ) || // throw() functions
302+ function->isAttributeNothrow ()) { // __attribute__((nothrow)) or __declspec(nothrow) functions
313303 isNoExcept = true ;
314304 }
315305 else if (mSettings ->library .isentrypoint (function->name ())) {
316306 isEntryPoint = true ;
317307 }
318308 if (!isNoExcept && !isEntryPoint)
319309 continue ;
310+
320311 if (const Token* throws = functionThrows (function)) {
321312 if (isEntryPoint)
322313 entryPointThrowError (throws);
You can’t perform that action at this time.
0 commit comments