[update_cc_test_checks.py] Handle extern "C" and namespaces
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Mon, 2 Dec 2019 10:53:57 +0000 (10:53 +0000)
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Mon, 2 Dec 2019 11:06:31 +0000 (11:06 +0000)
commit8ab3b4defd90a10db042ec80e61160a32e5403c0
treefb0ec80b41e69b706e86d914a715fc441a863b7e
parentd9542db49e90457de62af3bfe395aaf4c47b68a5
[update_cc_test_checks.py] Handle extern "C" and namespaces

Summary:
My change to use the clang AST JSON dump did not handle functions declared
inside scopes other than the root TranslationUnitDecl. After this change
update_cc_test_checks.py also works for C++ test cases that use extern "C"
and namespaces.

Reviewers: MaskRay

Reviewed By: MaskRay

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70389
llvm/utils/update_cc_test_checks.py