================
@@ -0,0 +1,20 @@
+// RUN: rm -rf %t.summary.json
+// RUN: %clang_cc1 -fsyntax-only %s \
+// RUN:   --ssaf-extract-summaries=CallGraph \
+// RUN:   --ssaf-tu-summary-file=%t.summary.json
+
+// Check that the JSON validation passes.
+// TODO: Enable the next line once the LinkageTable is populated.
+// R U N: clang-ssaf-format --type=tu %t.summary.json
+
+// Check that the JSON has plausible content irrespective of the order of the 
fields.
+// RUN: FileCheck %s --match-full-lines --input-file=%t.summary.json
+//   CHECK-DAG: "direct_callees": [
+//   CHECK-DAG: "pretty_name": "example()",
+//   CHECK-DAG: "virtual_callees": []
+//   CHECK-DAG: "summary_name": "CallGraph"
----------------
steakhal wrote:

Here I actually check some of the content of the JSON, e.g. the proper 
`pretty_name` and that the `virtual_callees` is empty and that `direct_callees` 
is NOT empty.  
So it's more than it seems at first glance.  
To me, it seemed enough for now.

https://github.com/llvm/llvm-project/pull/189681
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to