Skip to content

Commit f3fd36e

Browse files
committed
JSONNodeDumper.cpp - VisitIntegerLiteral - avoid APSInt::toString std::string wrapper. NFCI
Pulled out of D103888 - use the underlying SmallString version directly
1 parent d806d11 commit f3fd36e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

clang/lib/AST/JSONNodeDumper.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,9 +1414,10 @@ void JSONNodeDumper::VisitCXXDependentScopeMemberExpr(
14141414
}
14151415

14161416
void JSONNodeDumper::VisitIntegerLiteral(const IntegerLiteral *IL) {
1417-
JOS.attribute("value",
1418-
IL->getValue().toString(
1419-
/*Radix=*/10, IL->getType()->isSignedIntegerType()));
1417+
llvm::SmallString<16> Buffer;
1418+
IL->getValue().toString(Buffer,
1419+
/*Radix=*/10, IL->getType()->isSignedIntegerType());
1420+
JOS.attribute("value", Buffer);
14201421
}
14211422
void JSONNodeDumper::VisitCharacterLiteral(const CharacterLiteral *CL) {
14221423
// FIXME: This should probably print the character literal as a string,

0 commit comments

Comments
 (0)