[clang] [clang][ssaf] Implement JSONFormat (PR #180021)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 11 08:00:06 PST 2026
================
@@ -0,0 +1,973 @@
+#include "clang/Analysis/Scalable/Serialization/JSONFormat.h"
+#include "clang/Analysis/Scalable/TUSummary/TUSummary.h"
+
+#include "llvm/ADT/StringExtras.h"
+#include "llvm/Support/FileSystem.h"
+#include "llvm/Support/FormatVariadic.h"
+#include "llvm/Support/JSON.h"
+#include "llvm/Support/MemoryBuffer.h"
+#include "llvm/Support/Path.h"
+#include "llvm/Support/Registry.h"
+
+using namespace clang::ssaf;
+
+//----------------------------------------------------------------------------
+// ErrorBuilder - Fluent API for constructing contextual errors
+//----------------------------------------------------------------------------
+
+namespace {
+
+class ErrorBuilder {
----------------
steakhal wrote:
I noticed that methods within this class frequently use plain `const char *` parameters.
It's fairly unusual in the llvm codebase AFAIK. People usually just pass a StringRef or Twines.
Is there a reason you preferred raw pointers instead?
https://github.com/llvm/llvm-project/pull/180021
More information about the cfe-commits
mailing list