[clang][NFC] Store a pointer to the ASTContext in ASTDumper and TextNodeDumper
authorBruno Ricci <riccibrun@gmail.com>
Thu, 2 Jul 2020 17:55:07 +0000 (18:55 +0100)
committerBruno Ricci <riccibrun@gmail.com>
Thu, 2 Jul 2020 18:29:02 +0000 (19:29 +0100)
commitaa7fd905e4e1bc510448431da9310e8cf5197523
tree8a1953eabf7ac80fe1ea3a08eed69458992026f8
parent0059f6ffe84241b9728e48c1eabdaf1a6abbef66
[clang][NFC] Store a pointer to the ASTContext in ASTDumper and TextNodeDumper

In general there is no way to get to the ASTContext from most AST nodes
(Decls are one of the exception). This will be a problem when implementing
the rest of APValue::dump since we need the ASTContext to dump some kinds of
APValues.

The ASTContext* in ASTDumper and TextNodeDumper is not always
non-null. This is because we still want to be able to use the various
dump() functions in a debugger.

No functional changes intended.
19 files changed:
clang-tools-extra/clang-query/Query.cpp
clang-tools-extra/clangd/refactor/tweaks/DumpAST.cpp
clang/include/clang/AST/APValue.h
clang/include/clang/AST/ASTDumper.h
clang/include/clang/AST/ASTTypeTraits.h
clang/include/clang/AST/Comment.h
clang/include/clang/AST/Stmt.h
clang/include/clang/AST/TextNodeDumper.h
clang/include/clang/AST/Type.h
clang/lib/AST/APValue.cpp
clang/lib/AST/ASTDumper.cpp
clang/lib/AST/ASTTypeTraits.cpp
clang/lib/AST/TextNodeDumper.cpp
clang/lib/ASTMatchers/ASTMatchFinder.cpp
clang/lib/CodeGen/CGExprComplex.cpp
clang/lib/CodeGen/CGExprScalar.cpp
clang/lib/Frontend/ASTConsumers.cpp
clang/unittests/AST/CommentParser.cpp
clang/unittests/AST/MatchVerifier.h