[Lldb-commits] [lldb] r238722 - Remove "%zu" format specifier for MSVC.

Chaoren Lin chaorenl at google.com
Sun May 31 21:28:13 PDT 2015


Author: chaoren
Date: Sun May 31 23:28:12 2015
New Revision: 238722

URL: http://llvm.org/viewvc/llvm-project?rev=238722&view=rev
Log:
Remove "%zu" format specifier for MSVC.

Reviewers: zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10153

Modified:
    lldb/trunk/source/Symbol/ClangASTType.cpp

Modified: lldb/trunk/source/Symbol/ClangASTType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTType.cpp?rev=238722&r1=238721&r2=238722&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTType.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTType.cpp Sun May 31 23:28:12 2015
@@ -3712,7 +3712,7 @@ ClangASTType::GetChildClangTypeAtIndex (
                     if (element_type.GetCompleteType())
                     {
                         char element_name[64];
-                        ::snprintf (element_name, sizeof (element_name), "[%zu]", idx);
+                        ::snprintf(element_name, sizeof(element_name), "[%" PRIu64 "]", static_cast<uint64_t>(idx));
                         child_name.assign(element_name);
                         child_byte_size = element_type.GetByteSize(exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL);
                         child_byte_offset = (int32_t)idx * (int32_t)child_byte_size;
@@ -3733,7 +3733,7 @@ ClangASTType::GetChildClangTypeAtIndex (
                     if (element_type.GetCompleteType())
                     {
                         char element_name[64];
-                        ::snprintf (element_name, sizeof (element_name), "[%zu]", idx);
+                        ::snprintf(element_name, sizeof(element_name), "[%" PRIu64 "]", static_cast<uint64_t>(idx));
                         child_name.assign(element_name);
                         child_byte_size = element_type.GetByteSize(exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL);
                         child_byte_offset = (int32_t)idx * (int32_t)child_byte_size;





More information about the lldb-commits mailing list