aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/JSONNodeDumper.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2021-06-09 11:09:19 +0100
committerSimon Pilgrim <llvm-dev@redking.me.uk>2021-06-09 11:09:32 +0100
commitf3fd36e590f4ca36e466801bee40497714df895c (patch)
treecf9c29f768fd354d7bf047f3d6ee732ea491b3d1 /clang/lib/AST/JSONNodeDumper.cpp
parentd806d11b14e1db7d5c5986d563e74ca972f0e5e6 (diff)
downloadllvm-f3fd36e590f4ca36e466801bee40497714df895c.zip
llvm-f3fd36e590f4ca36e466801bee40497714df895c.tar.gz
llvm-f3fd36e590f4ca36e466801bee40497714df895c.tar.bz2
JSONNodeDumper.cpp - VisitIntegerLiteral - avoid APSInt::toString std::string wrapper. NFCI
Pulled out of D103888 - use the underlying SmallString version directly
Diffstat (limited to 'clang/lib/AST/JSONNodeDumper.cpp')
-rw-r--r--clang/lib/AST/JSONNodeDumper.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/AST/JSONNodeDumper.cpp b/clang/lib/AST/JSONNodeDumper.cpp
index d283558..038acee 100644
--- a/clang/lib/AST/JSONNodeDumper.cpp
+++ b/clang/lib/AST/JSONNodeDumper.cpp
@@ -1414,9 +1414,10 @@ void JSONNodeDumper::VisitCXXDependentScopeMemberExpr(
}
void JSONNodeDumper::VisitIntegerLiteral(const IntegerLiteral *IL) {
- JOS.attribute("value",
- IL->getValue().toString(
- /*Radix=*/10, IL->getType()->isSignedIntegerType()));
+ llvm::SmallString<16> Buffer;
+ IL->getValue().toString(Buffer,
+ /*Radix=*/10, IL->getType()->isSignedIntegerType());
+ JOS.attribute("value", Buffer);
}
void JSONNodeDumper::VisitCharacterLiteral(const CharacterLiteral *CL) {
// FIXME: This should probably print the character literal as a string,