Skip to content

Commit 271d3a7

Browse files
committed
[clang][TypePrinter] Honour SuppressTagKeyword in non-canonical TagType path
LLVM's behaviour may be right: Explicitly-written keywords should be preserved. It is simpler to have this downstream patch than handle all the cases in ROOT/Cling manually. Possibly fix the failing tests on Windows: - roottest-root-io-withoutDictionaries-IOWithoutDictionaries - roottest-root-io-withoutDictionaries-RowWiseNoProxyWarning - roottest-root-tree-stl-mixingInterp - roottest-root-tree-stl-mixingCompiled Need to revisit previous commits added to fix this issue.
1 parent 8fa930d commit 271d3a7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

interpreter/llvm-project/clang/lib/AST/TypePrinter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,8 @@ void TypePrinter::printTagType(const TagType *T, raw_ostream &OS) {
15261526
OS << ' ';
15271527
}
15281528
} else {
1529-
OS << TypeWithKeyword::getKeywordName(T->getKeyword());
1529+
if (!Policy.SuppressTagKeyword)
1530+
OS << TypeWithKeyword::getKeywordName(T->getKeyword());
15301531
if (T->getKeyword() != ElaboratedTypeKeyword::None) {
15311532
PrintedKindDecoration = true;
15321533
OS << ' ';

0 commit comments

Comments
 (0)