diff options
author | Yaron Keren <yaron.keren@gmail.com> | 2015-05-14 05:40:50 +0000 |
---|---|---|
committer | Yaron Keren <yaron.keren@gmail.com> | 2015-05-14 05:40:50 +0000 |
commit | e7aad46665c73f8e7c9d34f3d54013e1fc7e00ae (patch) | |
tree | 3da785e072e170a1411dac68403c8c20a67bae85 /clang/tools | |
parent | a84a0823840034f8f9fb7c86bf4163f19a5fb334 (diff) | |
download | bcm5719-llvm-e7aad46665c73f8e7c9d34f3d54013e1fc7e00ae.tar.gz bcm5719-llvm-e7aad46665c73f8e7c9d34f3d54013e1fc7e00ae.zip |
Replace non-standard %lld printf usage with PRId64.
See also r180024.
llvm-svn: 237339
Diffstat (limited to 'clang/tools')
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 13 |
1 files 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 56f39c2e12c..c19648bba4b 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 <ctype.h> #include <stdlib.h> #include <stdio.h> @@ -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; } |