[PATCH] D149677: [clang][TypePrinter] Add option to skip over elaborated types
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 4 11:39:11 PDT 2023
aaron.ballman added a comment.
Will this new printing policy be used in tree?
================
Comment at: clang/include/clang/AST/PrettyPrinter.h:143-145
+ /// Ignore qualifiers as specified by elaborated type sugar, instead letting
+ /// the underlying type handle printing the qualifiers.
+ unsigned IgnoreElaboratedQualifiers : 1;
----------------
The name is somewhat confusing to me, because tag names are also elaborations and those are handled by `SuppressTagKeyword` -- so what is the interaction between those when the user specifies true for `IgnoreElaboratedQualifiers` and false for `SuppressTagKeyword`?
================
Comment at: clang/unittests/AST/TypePrinterTest.cpp:116-119
+ ASSERT_TRUE(PrintedTypeMatches(Code, {}, Matcher, //
+ "a::S<b::Foo>", //
+ [](PrintingPolicy &Policy) {
+ Policy.FullyQualifiedName = true; //
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149677/new/
https://reviews.llvm.org/D149677
More information about the cfe-commits
mailing list