Flag '= {' as a braced init list when parsing C# code.
Details
Diff Detail
Event Timeline
Needs https://reviews.llvm.org/D75731 and https://reviews.llvm.org/D75747 to be merged first.
clang/lib/Format/UnwrappedLineParser.cpp | ||
---|---|---|
1467 | A more general approach might be to adapt parseBracedList() itself to mark the block kind BK_BracedInit: Could you try to see if it will be easy/possible to get the same effect by adapting that? |
clang/lib/Format/UnwrappedLineParser.cpp | ||
---|---|---|
1467 | Setting block kind inside parseBracedList() caused test failures outside of C# tests. I was hoping to make this surgical for now, hence the comment. |
A more general approach might be to adapt parseBracedList() itself to mark the block kind BK_BracedInit:
https://github.com/llvm/llvm-project/blob/7d2fdd3f6639731284dd8b6b274f01f04fd19215/clang/lib/Format/UnwrappedLineParser.cpp#L1628
Could you try to see if it will be easy/possible to get the same effect by adapting that?
If that's hard or has unintended side effects, we can reconsider.