-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add [[noreturn]] attribute to Output::fatal, add SST_Exit() function #1175
Changes from 1 commit
923e5b9
1839d2d
0068599
019b6f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,6 +117,8 @@ class Exit : public Action | |
bool single_rank; | ||
}; | ||
|
||
[[noreturn]] void SST_Exit(int exit_code); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if exit.h is the best place for this function to live. One of the issues is that exit.h is being installed, though it really shouldn't be, and SST_Exit() shouldn't be part of the public API. The other issue is that even though the names match, the functionality isn't really related to the Exit object. Of the header files that aren't installed, I think simulation_impl.h is probably the best place for the SST_Exit() function (not as part of the Simulation_impl object, however). Since The function won't be part of the non-core API, I think it's fine to leave as is for now if you don't want to change it and we can reevaluate later. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay I can move it anywhere, to prevent it from being publicly exported / documented. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, and since There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it makes sense to prefix it with SST. We haven't been good about enforcing naming conventions, though nominally we match the same camel case you describe. That being said, I think I like SST_Exit() better than SSTExit(). We can reevaluate later when we take a pass at cleaning up other names in the core. |
||
|
||
} // namespace SST | ||
|
||
#endif // SST_CORE_EXIT_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the coding standards, includes of standard headers should go after all sst includes. This is probably contributing to the clang-format failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran
clang-format
but my version is newer than v12 and I didn't feel like trying to go back to an older version.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not promising for moving clang-format forward if it doesn't follow the header ordering settings in the .clang-format file. You can look at the diff of what it got with what it wanted in the "checks" tab in the PR. Just select the clang-format check and click in the Matrix box to bring up the results of the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's too late to fix it now, but
clang-format
should have aversion 1.2.3
directive for.clang-format
files so that it behaves like a certain version. But as the number of versions increases, this becomes hard to test, and complicates the code to behave differently for different versions, although if this versioning scheme is done from the beginning, the versioned tests can be developed incrementally.