From e7aad46665c73f8e7c9d34f3d54013e1fc7e00ae Mon Sep 17 00:00:00 2001 From: Yaron Keren Date: Thu, 14 May 2015 05:40:50 +0000 Subject: [PATCH] Replace non-standard %lld printf usage with PRId64. See also r180024. llvm-svn: 237339 --- clang/tools/c-index-test/c-index-test.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index 56f39c2..c19648b 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -5,6 +5,7 @@ #include "clang-c/CXCompilationDatabase.h" #include "clang-c/BuildSystem.h" #include "clang-c/Documentation.h" +#include "llvm/Support/DataTypes.h" #include #include #include @@ -824,7 +825,7 @@ static void PrintCursor(CXCursor Cursor, const char *CommentSchemaFile) { } break; case CXTemplateArgumentKind_Integral: - printf(" [Template arg %d: kind: %d, intval: %lld]", + printf(" [Template arg %d: kind: %d, intval: %" PRId64 "]", I, TAK, clang_Cursor_getTemplateArgumentValue(Cursor, I)); break; default: @@ -1361,14 +1362,14 @@ static enum CXChildVisitResult PrintTypeSize(CXCursor cursor, CXCursor p, { long long Size = clang_Type_getSizeOf(T); if (Size >= 0 || Size < -1 ) { - printf(" [sizeof=%lld]", Size); + printf(" [sizeof=%" PRId64 "]", Size); } } /* Print the type alignof if applicable. */ { long long Align = clang_Type_getAlignOf(T); if (Align >= 0 || Align < -1) { - printf(" [alignof=%lld]", Align); + printf(" [alignof=%" PRId64 "]", Align); } } /* Print the record field offset if applicable. */ @@ -1393,10 +1394,10 @@ static enum CXChildVisitResult PrintTypeSize(CXCursor cursor, CXCursor p, FieldName); long long Offset2 = clang_Cursor_getOffsetOfField(cursor); if (Offset == Offset2){ - printf(" [offsetof=%lld]", Offset); + printf(" [offsetof=%" PRId64 "]", Offset); } else { /* Offsets will be different in anonymous records. */ - printf(" [offsetof=%lld/%lld]", Offset, Offset2); + printf(" [offsetof=%" PRId64 "/%" PRId64 "]", Offset, Offset2); } } } @@ -3999,7 +4000,7 @@ static int read_diagnostics(const char *filename) { } static int perform_print_build_session_timestamp(void) { - printf("%lld\n", clang_getBuildSessionTimestamp()); + printf("%" PRId64 "\n", clang_getBuildSessionTimestamp()); return 0; } -- 2.7.4