[clang] [clang][dataflow] Fix u8 string error with C++20. (PR #84302)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 7 02:58:01 PST 2024
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/84302
>From 66ba3d492bc09b1244d1b0abdee58e1015a19974 Mon Sep 17 00:00:00 2001
From: Martin Braenne <mboehme at google.com>
Date: Thu, 7 Mar 2024 10:50:57 +0000
Subject: [PATCH 1/2] [clang][dataflow] Fix u8 string error with C++20.
See also discussion on https://github.com/llvm/llvm-project/pull/84291.
---
clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp b/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp
index ff4e18de2c70f1..f2753d962f23a0 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=\""
>From c526138a8e18e846a6ee9c1a1020fe6623893259 Mon Sep 17 00:00:00 2001
From: Martin Braenne <mboehme at google.com>
Date: Thu, 7 Mar 2024 10:57:41 +0000
Subject: [PATCH 2/2] fixup! [clang][dataflow] Fix u8 string error with C++20.
---
clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp b/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp
index f2753d962f23a0..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
- const char *ConvergenceMarker = (const char*)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