================
@@ -1635,6 +1635,17 @@ void TypePrinter::printElaboratedBefore(const
ElaboratedType *T,
if (T->getKeyword() != ElaboratedTypeKeyword::None)
OS << " ";
NestedNameSpecifier *Qualifier = T->getQualifier();
+ if (!Policy.SuppressTagKeyword && Policy.SuppressScope &&
+ !Policy.SuppressUnwrittenScope) {
+ StringRef prefix = T->isClassType() ? "class "
+ : T->isStructureType() ? "struct "
+ : T->isUnionType() ? "union "
+ : "";
+ OS << prefix;
+ Policy.SuppressTagKeyword = true;
+ Policy.SuppressScope = false;
----------------
AaronBallman wrote:
The code was broken but no tests failed, then the fix you made was also broken
but still no tests failed. So I'm asking you to write a new test that
demonstrates incorrect behavior related to failing to reset the printing policy
after modifying it, then fix the code until that test shows the correct
behavior.
https://github.com/llvm/llvm-project/pull/84014
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits