[llvm-branch-commits] [clang-tools-extra] [clang-doc] add namespaces to JSON generator (PR #143209)
Paul Kirth via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jun 10 07:04:53 PDT 2025
================
@@ -0,0 +1,25 @@
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: clang-doc --output=%t --format=json --executor=standalone %s
+// RUN: FileCheck %s < %t/GlobalNamespace/index.json
+
+static void myFunction() {}
+
+void noExceptFunction() noexcept {}
+
+inline void inlineFunction() {}
+
+extern void externFunction() {}
+
+constexpr void constexprFunction() {}
+
+// CHECK: "Functions": [
+// CHECK-NEXT: {
+// CHECK: "IsStatic": true,
----------------
ilovepi wrote:
Matching the property and the name after should be OK, though not ideal. IIRC the JSON we emit from readobj isn't sorted by key, so maybe there is a setting in the JSON builder? Or maybe it's because it uses a JSON stream? I can't quite recall, but it may be worth looking at other subprojects to see how they deal with the issue.
https://github.com/llvm/llvm-project/pull/143209
More information about the llvm-branch-commits
mailing list