C# verbatim, interpolated strings sometimes break #58062
Labels
c#
clang-format
invalid-code-generation
Tool (e.g. clang-format) produced invalid code that no longer compiles
I have two files that each have a single verbatim, interpolated string:
mwe-good.cs:
mwe-bad.cs
When running
clang-format --style=LLVM mwe-good.cs
, the output is identical to the file (yay!). When running it onmwe-bad.cs
, the output is different:There's an extra space added, which causes compilation errors (when it's a full file and not a MWE). As of C# 8, both orderings are accepted.
As a bug report, I'd like the space to no longer be added. As a small feature request, and only if it's easy to implement/maintain, I think it would be nice if clang-format picked an ordering of the two symbols and made verbatim, interpolated strings always use that order.
The text was updated successfully, but these errors were encountered: