Skip to content

Commit cb2d7fb

Browse files
committed
More review comments
1 parent 967248c commit cb2d7fb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

clang/lib/AST/DeclPrinter.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ void DeclPrinter::prettyPrintAttributes(const Decl *D,
258258
return;
259259

260260
if (D->hasAttrs()) {
261+
assert(Pos != AttrPosAsWritten::Unknown && "Use Default");
261262
const AttrVec &Attrs = D->getAttrs();
262263
for (auto *A : Attrs) {
263264
if (A->isInherited() || A->isImplicit())
@@ -272,10 +273,10 @@ void DeclPrinter::prettyPrintAttributes(const Decl *D,
272273
assert(APos != AttrPosAsWritten::Unknown && "Implicit attribute!");
273274
if (Pos == AttrPosAsWritten::Default || Pos == APos) {
274275
if (Pos != AttrPosAsWritten::Left)
275-
Out << " ";
276+
Out << ' ';
276277
A->printPretty(Out, Policy);
277278
if (Pos == AttrPosAsWritten::Left)
278-
Out << " ";
279+
Out << ' ';
279280
}
280281
break;
281282
}

clang/lib/AST/StmtPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ void StmtPrinter::VisitAttributedStmt(AttributedStmt *Node) {
296296
for (const auto *Attr : Attrs) {
297297
Attr->printPretty(OS, Policy);
298298
if (Attr != Attrs.back())
299-
OS << " ";
299+
OS << ' ';
300300
}
301301

302302
PrintStmt(Node->getSubStmt(), 0);

0 commit comments

Comments
 (0)