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

Guard use of custom attributes against macroization #2649

Merged
merged 2 commits into from
Apr 16, 2022

Conversation

CaseyCarter
Copy link
Member

Define _MSVC_MEOW macro in <yvals_core.h>for each [[msvc::meow]] custom attribute with surrounding push_macro/pop_macro guards.

Fixes #2645

Define `_MSVC_MEOW` macro in `<yvals_core.h>`for each `[[msvc::meow]]` custom attribute with surrounding push_macro/pop_macro guards.

Fixes microsoft#2645
@CaseyCarter CaseyCarter added the bug Something isn't working label Apr 12, 2022
@CaseyCarter CaseyCarter requested a review from a team as a code owner April 12, 2022 22:58
@CaseyCarter
Copy link
Member Author

One of the compiler devs is reworking how the constexpr evaluator interfaces with construct_at / ranges::construct_at and may be adding a custom attribute. If so, I'll probably integrate this PR into their changes so the same "guard" mechanism is used for the new attribute.

stl/inc/yvals_core.h Show resolved Hide resolved
@StephanTLavavej StephanTLavavej self-assigned this Apr 15, 2022
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 7209f86 into microsoft:main Apr 16, 2022
@StephanTLavavej
Copy link
Member

Macros incoming! Shields up, red alert! 🚨 🛡️ 😹

@CaseyCarter CaseyCarter deleted the custom-attributes branch April 17, 2022 04:46
@MikeGitb
Copy link

@CaseyCarter : Are those [[msvc::meow]] attributes documented somewhere? Or, more to the point: Are they officially supported or just something for toolchain implementors?

All I found was https://docs.microsoft.com/en-us/cpp/cpp/attributes?view=msvc-170, which only mentions standard attributes and gsl::suppress(rules)?

@CaseyCarter
Copy link
Member Author

CaseyCarter commented Apr 19, 2022

@CaseyCarter : Are those [[msvc::meow]] attributes documented somewhere? Or, more to the point: Are they officially supported or just something for toolchain implementors?

[[msvc::no_unique_address]] should be documented, but [[msvc::known_semantics]], [[msvc::noop_dtor]], and [[msvc::constexpr]] are purely for internal communication between the STL and C1XX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<yvals_core.h>: Conformance issue on [[msvc::known_semantics]]
5 participants