We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For the following code:
template<typename Writer> void write_to(Writer& writer, const FieldHeader& field_header) { #define WRITE_MESSAGE(type) \ { \ case FieldType::type: { \ writer.value(#type); \ writer.key("Message").start_object(); \ write_to(writer, cast_to<type>(field_header)); \ writer.finish_object(); \ return; \ } \ } }
Ubuntu clang-format version 19.1.7 (++20250114103238+cd708029e0b2-1~exp1~20250114103342.77)
Produces
template<typename Writer> void write_to(Writer& writer, const FieldHeader& field_header) { #define WRITE_MESSAGE(type) \ {case FieldType::type: {writer.value(#type); \ writer.key("Message").start_object(); \ write_to(writer, cast_to<type>(field_header)); \ writer.finish_object(); \ return; \ } \ } }
But
Ubuntu clang-format version 19.1.6 (++20241217110052+657e03f8625c-1~exp1~20241217110110.73)
Does not change the file
clang-format-19 file.cpp --dump-config: https://pastebin.com/7vebyX6j
clang-format-19 file.cpp --dump-config
The text was updated successfully, but these errors were encountered:
@llvm/issue-subscribers-clang-format
Author: None (chegoryu)
template<typename Writer> void write_to(Writer& writer, const FieldHeader& field_header) { #define WRITE_MESSAGE(type) \ {case FieldType::type: {writer.value(#type); \ writer.key("Message").start_object(); \ write_to(writer, cast_to<type>(field_header)); \ writer.finish_object(); \ return; \ } \ } }
Sorry, something went wrong.
[clang-format] Correctly annotate braces in macro definitions
04b03d2
Fixes llvm#123179.
a7bca18
/cherry-pick a7bca18
/pull-request #123439
owenca
Successfully merging a pull request may close this issue.
For the following code:
Produces
But
Does not change the file
clang-format-19 file.cpp --dump-config
: https://pastebin.com/7vebyX6jThe text was updated successfully, but these errors were encountered: