[PATCH] D146809: [clang-repl] Implement pretty printing of custom types.

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 17 08:27:07 PDT 2023


v.g.vassilev added inline comments.


================
Comment at: clang/lib/Headers/__clang_interpreter_runtime_printvalue.h:79
+
+template <typename T, typename = void> struct is_iterable : std::false_type {};
+
----------------
aaron.ballman wrote:
> Still need to make sure you're using reserved identifiers for these (should make a pass through the file and get all of the identifiers).
Could you check now, I think I fixed all I thought needed fixing.


================
Comment at: clang/lib/Interpreter/ValuePrinter.cpp:164
+
+// TODO: Encodings.
+static std::string PrintOneChar(char Val) {
----------------
aaron.ballman wrote:
> Not just encodings, but also: how do you handle unprintable characters (like control characters)?
Extended the FIXME.


================
Comment at: clang/lib/Interpreter/ValuePrinter.cpp:543
+    default:
+      llvm_unreachable("Unknown Builtintype kind");
+    }
----------------
aaron.ballman wrote:
> This seems rather reachable, no?
Do you mean that's not exhaustive list that we list here?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146809/new/

https://reviews.llvm.org/D146809



More information about the cfe-commits mailing list