[clang][TypePrinter] Add option to skip over elaborated types
authorEric Li <li.zhe.hua@gmail.com>
Tue, 2 May 2023 17:59:46 +0000 (13:59 -0400)
committerEric Li <li.zhe.hua@gmail.com>
Tue, 6 Jun 2023 19:11:09 +0000 (15:11 -0400)
commit3cb6ead77c6668fcd1362763b2603752c6c595fa
tree42e11ae8b5cc2ed64bf90b5def6c21823594fd9a
parent64666d46c0bb0575e62525a5b867569b32850116
[clang][TypePrinter] Add option to skip over elaborated types

Elaborated types are sugar that represent how the type was spelled in
the original source. When printing a type outside of that original
context, the qualifiers as saved in the elaborated type will be
incorrect. Additionally, their existence also inhibits the use of
`PrintingCallbacks::isScopeVisible` as a customization point.

Differential Revision: https://reviews.llvm.org/D149677
clang/include/clang/AST/PrettyPrinter.h
clang/lib/AST/TypePrinter.cpp
clang/unittests/AST/TypePrinterTest.cpp