[clang] a11ab13 - [clang][dataflow] Fix u8 string error with C++20. (#84302)

via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 7 03:53:30 PST 2024


Author: martinboehme
Date: 2024-03-07T12:53:26+01:00
New Revision: a11ab139e4de9cdad41c299f198515c09be6f05d

URL: https://github.com/llvm/llvm-project/commit/a11ab139e4de9cdad41c299f198515c09be6f05d
DIFF: https://github.com/llvm/llvm-project/commit/a11ab139e4de9cdad41c299f198515c09be6f05d.diff

LOG: [clang][dataflow] Fix u8 string error with C++20. (#84302)

See also discussion on https://github.com/llvm/llvm-project/pull/84291.

Added: 
    

Modified: 
    clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp b/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp
index ff4e18de2c70f1..6afd66d9dc6ac5 100644
--- a/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp
+++ b/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp
@@ -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";
+      const char *ConvergenceMarker = (const char *)u8"\\n\u2192\u007c";
       if (BlockConverged[I])
         Name += ConvergenceMarker;
       GraphS << "  " << blockID(I) << " [id=" << blockID(I) << " label=\""


        


More information about the cfe-commits mailing list