-
Notifications
You must be signed in to change notification settings - Fork 611
Update TPM2 session FIXME comments to document intentional implicit conversions #5118
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
Update TPM2 session FIXME comments to document intentional implicit conversions #5118
Conversation
570f06d to
3391122
Compare
3391122 to
63a4253
Compare
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.
Unfortunately I have to oppose this PR. The implicit conversion operators and constructors were intentional for API ergonomics. The required adaptions in the implementation (adding static_cast and explicit constructor calls in many places) are exactly what they were meant to avoid. 🙂
Alright. Then I'm retrieving the header contents here in a similar way to #5119.
Here, along with “SessionBundle,” most likely this entire branch will be reverted and only the FIXME messages will be updated, but I'm not sure. I'll look into it. Thanks for review. |
Update NOLINTNEXTLINE comments to document that implicit converions in SessionHandle and SessionBundle are intentional design choices for C API wrapper ergonomics, not issues to be fixed.
63a4253 to
a8a77af
Compare
Thank you for the feedback again. I apologize for the confusion. I misunderstood the scope - I focused on the FIXME comments but incorrectly assumed the implicit conversions should be removed. I now understand they are intentional design choices for API ergonomics. I updated this PR to only replace the FIXME comments in |
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.
Thanks!
Hello Botan Developer Team,
This pull request handling Clang-Tidy suppression in thetmp2_session.hfile.- Mark SessionBundle constructor as explicit- Mark SessionHandle::operator ESYS_TR() as explicitSource: C++ Core Guidlines C.46 By default, declare single-argument constructors explicitUPDATE:
This PR updates FIXME comments in
tpm2_session.hto properly document the intentional use of implicit conversions in TPM2 session wrapper classes.SessionHandle::operator ESYS_TR()NOLINTNEXTLINE commentSessionBundleconstructor NOLINTNEXTLINE commentIf need any change or edits, please write comment to me. I fix.
Regards.