[clang] [update_cc_test_checks] Use lit's shell to run commands (PR #65333)

Alexander Richardson via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 6 08:53:39 PDT 2023


================
@@ -34,29 +35,22 @@
 }
 
 
-def get_line2func_list(args, clang_args):
+def get_line2func_list(clang_cmd: Command):
     ret = collections.defaultdict(list)
     # Use clang's JSON AST dump to get the mangled name
-    json_dump_args = [args.clang] + clang_args + ["-fsyntax-only", "-o", "-"]
+    json_dump_args = clang_cmd.args + ["-fsyntax-only", "-o", "/dev/null"]
----------------
arichardson wrote:

This change is not required, it seems JSON is always printed to stdout. This is just to ensure to other output is produced (although probably -fsyntax-only) is sufficient.

https://github.com/llvm/llvm-project/pull/65333


More information about the cfe-commits mailing list