Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[clang-format] [reflection] Missing space between typename and splicer #192040

@mk-huawei

Description

@mk-huawei

Currently formatted code (clang-format 21.1.8):

int main() {
  typename[:^^int:] i = 42;
  typename int i = 42;
}

Expected:

int main() {
  typename [:^^int:] i = 42;
  typename int i = 42;
}

Splicer [: :] is not recognized and no space is added after typename.
It seems reasonable to have the same formatting whether the type is spellt out explicitly or it comes from a splicer.

Metadata

Metadata

Labels

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions