[PATCH] D151747: [llvm-jd] introduces a new tool for diffing JSON
Thorsten via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 8 06:21:54 PDT 2023
tschuett added inline comments.
================
Comment at: llvm/utils/llvm-jd/llvm-jd.cpp:167
+ [[nodiscard]] bool is_empty() const noexcept {
+ return Path.empty() and Removals.empty() and Additions.empty();
+ }
----------------
The `and' s are cute, but no thanks.
================
Comment at: llvm/utils/llvm-jd/llvm-jd.cpp:187
+// Writes `Data` to `Path`, or stdout if `Path` is empty.
+static void WriteToFile(const std::vector<DiffResult> &Data,
+ std::string_view Path) {
----------------
Unfortunately, std::span is only available with C++20. I would instead go for llvm::ArrayRef.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151747/new/
https://reviews.llvm.org/D151747
More information about the llvm-commits
mailing list