__pragma(execution_character_set(push, "UTF-8")) is used in TraceLoggingProvider.h. This commit
implements a no-op handler for compatability, similar to how the flag -fexec_charset is handled.
Details
- Reviewers
cfe-commits rnk thakis - Commits
- rG0f56b22614c8: Add PragmaHandler for MSVC pragma execution_character_set
rCTE356185: Add PragmaHandler for MSVC pragma execution_character_set
rC356185: Add PragmaHandler for MSVC pragma execution_character_set
rL356185: Add PragmaHandler for MSVC pragma execution_character_set
Diff Detail
- Repository
- rC Clang
Event Timeline
Does our serialization machinery serialize these correctly automatically? What happens if you compiler a header saying execution_character_set_push, "utf-8") in a header, compile that to a pch, then include that through the pch in a .c file that does pop?
My guess is that this either needs (de)serialization code or a warning when the stack is not empty when a pch is written.
(Examples: https://reviews.llvm.org/rL262493 https://reviews.llvm.org/rL262539 -- the latter one is probably a better example)
This implementation doesn't track the push/pop stack, it just verifies the synax is valid and moves on. I modeled it after the PragmaWarningHandler which does the same, and thought it would be fine in this case since the only accepted value is a no-op.
Ah ok, then I agree this doesn't need serialization yet :)
It'd be nice to at least diag that the stack use is valid (also for the warning stack), but it doesn't have to be in this change.