-
-
Notifications
You must be signed in to change notification settings - Fork 609
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
Fix 21530 - dtoh: Sanitize identifiers wrt. reserved C++ keywords #12122
Fix 21530 - dtoh: Sanitize identifiers wrt. reserved C++ keywords #12122
Conversation
|
Thanks for your pull request and interest in making D better, @MoonlightSentinel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#12122" |
6c7d324 to
e24f05f
Compare
| @@ -3562,7 +3562,7 @@ class ToCppBuffer final : public Visitor | |||
| void visit(AliasDeclaration* ad); | |||
| void visit(Nspace* ns); | |||
| void visit(CPPNamespaceDeclaration* ns); | |||
| void handleNspace(Dsymbol* namespace, Array<Dsymbol* >* members); | |||
| void handleNspace(Dsymbol* namespace_, Array<Dsymbol* >* members); | |||
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.
Could we just not emit parameter names? They are just superfluous information at best.
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.
Sanitizing here as well makes sense IMO, especially as all comments are stripped, so documentation is scarce already.
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.
Hmmm, maybe it would be useful if we could generate the documentation for the C++ headers also? We could simply paste the initial comment
e24f05f to
d252494
Compare
Extends the check for C++ keywords to append an underscore instead of raising an error whenever the actual name doesn't matter for binary compatibility.
d252494 to
843bc85
Compare
|
(Rebased to resolve the merge conflicts) |
Extends the check for C++ keywords to append an underscore instead of
raising an error whenever the actual name doesn't matter for binary
compatibility.
CC @kinke @ibuclaw