Issue |
124985
|
Summary |
[clang] Should escape sequences be rendered in static_asserts?
|
Labels |
clang
|
Assignees |
|
Reporter |
torshepherd
|
This is probably intended behavior, but I wanted to flag that clang's handling of ANSI escape code in static_asserts is different than in GCC.
```cpp
constexpr std::string_view t = "\x1b[31mThis should be red\x1b[0m";
static_assert(0, t);
```
On clang (trunk), prints:

Whereas GCC-14.2 prints:

This allows for fun things such as rendering images in color in static_assertion failures, but nothing in the standard I can think of requires this behavior.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs