I am planning to use this feature to make update_cc_test_checks.py less fragile
by obtaining the mangled names directly from -ast-dump=json.
This is a series of five commits (but since they are all small I've squashed them into one review):
Add a --update flag to gen_ast_dump_json_test.py
This will allow updating the JSON tests for new format changes. Instead of
simply appending the JSON to the input file, the script will now make a
copy of the input file up to the "CHECK lines have been autogenerated"
disclaimer and then append the new JSON.
Parse RUN: line for gen_ast_dump_json_test.py with --update
Infer --filters flags when using gen_ast_dump_json_test.py --update
Skip manual tests when using gen_ast_dump_json_tests.py --update
Include the mangled name in -ast-dump=json
I am planning to use this feature to make update_cc_test_checks.py less fragile
by obtaining the mangled names directly from -ast-dump=json. Currently,
it uses c-index-test which ignores the -triple=, etc. arguments that are
in the RUN: line and therefore does not generate checks for some targets.
The AST dump tests were updated using the following script:
for src in $LLVM_SRC/clang/test/AST/ast-dump-*-json.*; do if ! python $LLVM_SRC/clang/test/AST/gen_ast_dump_json_test.py --clang $LLVM_BUILD/bin/clang --update --source $src; then echo "FAILED TO UPDATE $src"; break; fi; done