Skip to content
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

[Protoc] C++ Resolved an issue where NO_DESTROY and CONSTINIT are in incorrect order #8296

Merged
merged 2 commits into from Feb 17, 2021

Conversation

Yuhanun
Copy link
Contributor

@Yuhanun Yuhanun commented Feb 14, 2021

According to cppreference: https://en.cppreference.com/w/cpp/language/declarations#Simple_declaration

It should be:
Attributes Specifiers Type Identifier [ = init_value];
not:
Specifiers Attributes Type Identifier [ = init_value];

This pull request solves that.

Issue is shown here:
https://godbolt.org/z/xncqfh

@google-cla
Copy link

google-cla bot commented Feb 14, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Feb 14, 2021
@Yuhanun
Copy link
Contributor Author

Yuhanun commented Feb 14, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.

What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot I signed it!

@google-cla google-cla bot added cla: yes and removed cla: no labels Feb 14, 2021
@Yuhanun Yuhanun changed the title Resolved an issue where NO_DESTROY and CONSTINIT were in incorrect order [Protoc] Resolved an issue where NO_DESTROY and CONSTINIT were in incorrect order Feb 14, 2021
@Yuhanun Yuhanun changed the title [Protoc] Resolved an issue where NO_DESTROY and CONSTINIT were in incorrect order [Protoc] Resolved an issue where NO_DESTROY and CONSTINIT are in incorrect order Feb 14, 2021
@mumbleskates
Copy link
Contributor

@Yuhanun There are also a large number of fixable instances of PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_NO_DESTROY in non-generated source files!
image

@mumbleskates
Copy link
Contributor

see: mumbleskates@30d51ad

@Yuhanun
Copy link
Contributor Author

Yuhanun commented Feb 14, 2021

@Yuhanun There are also a large number of fixable instances of PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_NO_DESTROY in non-generated source files!
image

I thought these were generated. I'll fix them as soon as I get to it. How do I make the tests run in the PR?

@Yuhanun
Copy link
Contributor Author

Yuhanun commented Feb 14, 2021

see: mumbleskates@30d51ad

I'm assuming this means you've fixed it?

Thank you! Please do mention me as contributor if possible.

Nevermind, it's on your own fork.

@Yuhanun
Copy link
Contributor Author

Yuhanun commented Feb 14, 2021

Pushed these changes to my Fork.

@Yuhanun Yuhanun changed the title [Protoc] Resolved an issue where NO_DESTROY and CONSTINIT are in incorrect order [Protoc] C++ Resolved an issue where NO_DESTROY and CONSTINIT are in incorrect order Feb 14, 2021
@Yuhanun
Copy link
Contributor Author

Yuhanun commented Feb 17, 2021

Any update on this? This issue is preventing CLANG from building.

@acozzette acozzette merged commit 8a39e13 into protocolbuffers:master Feb 17, 2021
@acozzette
Copy link
Member

Thanks for this fix, @Yuhanun.

@Yuhanun
Copy link
Contributor Author

Yuhanun commented Feb 22, 2021

No worries!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants