summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Demangle
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2018-08-02 17:08:24 +0000
committerZachary Turner <zturner@google.com>2018-08-02 17:08:24 +0000
commit7563ebe391321ba396ca6e6d59d968b4fc1915f3 (patch)
treeb85a57d189ca9c41ccb545a6c927afe4501aa942 /llvm/lib/Demangle
parent172aea10fa5a6f82717e701d0ba1f531d5e6027f (diff)
downloadbcm5719-llvm-7563ebe391321ba396ca6e6d59d968b4fc1915f3.tar.gz
bcm5719-llvm-7563ebe391321ba396ca6e6d59d968b4fc1915f3.zip
Use %.*s instead of %*s when formatting strings with explicit length.
llvm-svn: 338737
Diffstat (limited to 'llvm/lib/Demangle')
-rw-r--r--llvm/lib/Demangle/MicrosoftDemangle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Demangle/MicrosoftDemangle.cpp b/llvm/lib/Demangle/MicrosoftDemangle.cpp
index 0aec01eb600..76f64c8d6be 100644
--- a/llvm/lib/Demangle/MicrosoftDemangle.cpp
+++ b/llvm/lib/Demangle/MicrosoftDemangle.cpp
@@ -2081,7 +2081,7 @@ void Demangler::dumpBackReferences() {
Type::outputPre(OS, *T, *this);
Type::outputPost(OS, *T, *this);
- std::printf(" [%d] - %*s\n", (int)I, (int)OS.getCurrentPosition(),
+ std::printf(" [%d] - %.*s\n", (int)I, (int)OS.getCurrentPosition(),
OS.getBuffer());
}
std::free(OS.getBuffer());
@@ -2090,7 +2090,7 @@ void Demangler::dumpBackReferences() {
std::printf("\n");
std::printf("%d name backreferences\n", (int)BackRefCount);
for (size_t I = 0; I < BackRefCount; ++I) {
- std::printf(" [%d] - %*s\n", (int)I, (int)BackReferences[I].size(),
+ std::printf(" [%d] - %.*s\n", (int)I, (int)BackReferences[I].size(),
BackReferences[I].begin());
}
if (BackRefCount > 0)
OpenPOWER on IntegriCloud