[clang] [dataflow][nfc] Fix u8 string usage with c++20 (PR #84291)

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 7 02:38:58 PST 2024


================
@@ -500,7 +500,7 @@ class HTMLLogger : public Logger {
     for (unsigned I = 0; I < CFG.getNumBlockIDs(); ++I) {
       std::string Name = blockID(I);
       // Rightwards arrow, vertical line
-      char ConvergenceMarker[] = u8"\\n\u2192\u007c";
+      char ConvergenceMarker[] = "\\n\u2192\u007c";
----------------
RKSimon wrote:

@thevinster @martinboehme This change now fails on MSVC builds:

`warning C4566: character represented by universal-character-name '\u2192' cannot be represented in the current code page (1252)`

Maybe try this instead?
```c
const char *ConvergenceMarker = (const char*)u8"\\n\u2192\u007c";
```

https://github.com/llvm/llvm-project/pull/84291


More information about the cfe-commits mailing list