Include the mangled name in -ast-dump=json
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Fri, 15 Nov 2019 12:33:16 +0000 (12:33 +0000)
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Fri, 15 Nov 2019 12:52:56 +0000 (12:52 +0000)
commit3c3048c18b09cac5f7d17fc0655d781e457fd006
treecff3af9110fb2f2b4bb42f1f76c723dac813a8f3
parent709ea1720799b788b3c8c59f5571134e983f9cc6
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 command:
`python $LLVM_BINDIR/gen_ast_dump_json_test.py --update --source $LLVM_SRC/clang/test/AST/*-json.*`

Reviewers: aaron.ballman

Reviewed By: aaron.ballman

Subscribers: rsmith, MaskRay, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D69564
17 files changed:
clang/include/clang/AST/JSONNodeDumper.h
clang/lib/AST/JSONNodeDumper.cpp
clang/test/AST/ast-dump-decl-context-json.cpp
clang/test/AST/ast-dump-decl-json.c
clang/test/AST/ast-dump-decl-json.m
clang/test/AST/ast-dump-expr-json.c
clang/test/AST/ast-dump-expr-json.cpp
clang/test/AST/ast-dump-expr-json.m
clang/test/AST/ast-dump-funcs-json.cpp
clang/test/AST/ast-dump-if-json.cpp
clang/test/AST/ast-dump-macro-json.c
clang/test/AST/ast-dump-record-definition-data-json.cpp
clang/test/AST/ast-dump-records-json.cpp
clang/test/AST/ast-dump-stmt-json.c
clang/test/AST/ast-dump-stmt-json.cpp
clang/test/AST/ast-dump-stmt-json.m
clang/test/AST/ast-dump-template-decls-json.cpp