summaryrefslogtreecommitdiffstats
path: root/clang/test/AST/gen_ast_dump_json_test.py
Commit message (Collapse)AuthorAgeFilesLines
* Switch to opening the temp file in binary modeAaron Ballman2019-12-031-1/+1
| | | | | This corrects an issue where the script would write the file with the incorrect line endings on Windows.
* Differentiate between the presumed and actual file when dumping the AST to JSONAaron Ballman2019-12-031-1/+3
| | | | | | | | | | Currently, when dumping the AST to JSON, the presumed file is what is included when dumping a source location. This patch changes the behavior to instead dump the actual file, and only dump a presumed file name when it differs from the actual file. This also corrects an issue with the test script generator that would prevent it from working on Windows due to file permissions issues.
* [gen_ast_dump_json_test.py] Allow updating multiple files in one goAlex Richardson2019-11-151-26/+34
| | | | | | | | With this change it is possible to update all JSON dump tests using the following command: python $LLVM_BINDIR/gen_ast_dump_json_test.py --update --source $LLVM_SRC/clang/test/AST/*-json.* See https://reviews.llvm.org/D70119
* [gen_ast_dump_json_test.py] Copy to binary directory to omit --clang argumentAlex Richardson2019-11-151-2/+10
| | | | | | | | | | The script will now check if a clang binary exists in the same directory and default to that instead of requiring a --clang argument. The script is copied to the clang build directory using CMake configure_file() with COPYONLY. This ensures that the version in the build directory is updated any time the source version changes. See https://reviews.llvm.org/D70119
* [gen_ast_dump_json_test.py] Skip manual tests when using --updateAlex Richardson2019-11-151-3/+8
| | | | See https://reviews.llvm.org/D70119
* [gen_ast_dump_json_test.py] Infer --filters flags when using --updateAlex Richardson2019-11-151-10/+27
| | | | See https://reviews.llvm.org/D70119
* [gen_ast_dump_json_test.py] Parse RUN: lines with --updateAlex Richardson2019-11-151-8/+33
| | | | See https://reviews.llvm.org/D70119
* [gen_ast_dump_json_test.py] Add a --update flagAlex Richardson2019-11-151-12/+21
| | | | | | | | | 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. See https://reviews.llvm.org/D70119
* Add more information to JSON AST dumping of source locations.Aaron Ballman2019-10-151-2/+2
| | | | | | This adds information about the offset within the source file to the given source location as well as information about the include file a location is from. These pieces of information allow for more efficient post-processing of JSON AST dumps. llvm-svn: 374921
* Avoid crash when dumping NULL Type as JSON.Aaron Ballman2019-08-291-1/+1
| | | | | | Patch by Bert Belder. llvm-svn: 370401
* Add an automated note to files produced by gen_ast_dump_json_test.py.Aaron Ballman2019-06-211-0/+7
| | | | | | This also details what filters, if any, were used to generate the test output. Updates all the current JSON testing files to include the automated note. llvm-svn: 364055
* Add a script to help generate expected test output for dumping the AST to JSON.Aaron Ballman2019-06-191-0/+137
Patch by Abhishek Bhaskar. llvm-svn: 363820
OpenPOWER on IntegriCloud