| Issue |
75815
|
| Summary |
clang-format is confused by C# 'new' modifier
|
| Labels |
clang-format
|
| Assignees |
|
| Reporter |
russellw
|
It seems that use of the 'new' method modifier in C#, causes clang-format to become confused, and mangle the formatting. This example formats correctly without the 'new' modifier, but is mangled with it:
```
sealed class OrderedSet<T>: List<T> {
public new void Add(T item) {// In theory, this is O(N) per item
// but in practice on modern hardware
// it is fast for the anticipated range of N
if (!Contains(item)) base.Add(item);
}
}
```
[OrderedSet.cs.txt](https://github.com/llvm/llvm-project/files/13705682/OrderedSet.cs.txt)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs