A slightly more concise AST dump :)
authorDani Ferreira Franco Moura <danimoura@google.com>
Tue, 31 Jan 2023 11:53:40 +0000 (11:53 +0000)
committerDani Ferreira Franco Moura <danimoura@google.com>
Fri, 10 Feb 2023 19:11:31 +0000 (19:11 +0000)
commit70acb3aab3a10eea802781f69c8336c21dce6d59
treeebabab74f992f4415ad3915b4c3380aae42d1259
parent83e84cdbe4bc6b6f42cf948b1f8410fb74acc650
A slightly more concise AST dump :)

If the modifiedType and the minimally desugared type of an AttributedType are the same, then we do not need to show both in an AST dump.

Here, we change VisitAttributedType to only visit the modifiedType when it is different from the equivalentType (the minimally desugared type), because the latter is already visited by default.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D142637
clang/include/clang/AST/ASTNodeTraverser.h
clang/test/AST/ast-dump-attr-type.cpp [new file with mode: 0644]
clang/test/AST/ast-dump-types-json.cpp