Revert r237339 as sanitizer-ppc64-linux1 does not like it.
Complains: /home/buildbots/sanitizerslave1/sanitizer-ppc64-1/build/llvm/tools/clang/tools/c-index-test/c-index-test.c:829:30: error: format specifies type 'long' but the argument has type 'long long' [-Werror,-Wformat] I, TAK, clang_Cursor_getTemplateArgumentValue(Cursor, I)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I'm not sure now how this should be fixed. %lld is non-standard and not accepted by mingw on Windows while PRId64 is bad for this bot. Is long long longer than 64 bits here? if not, why is PRId64 incompatible with it? something seems wrong. Probably all the datatypes should be replaced to unsigned or uint64_t depending upin requirements instead of the non standard long long. llvm-svn: 237346
This commit is contained in:
parent
1a9ca774b6
commit
129dfbff4a
|
@ -5,7 +5,6 @@
|
|||
#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>
|
||||
|
@ -825,7 +824,7 @@ static void PrintCursor(CXCursor Cursor, const char *CommentSchemaFile) {
|
|||
}
|
||||
break;
|
||||
case CXTemplateArgumentKind_Integral:
|
||||
printf(" [Template arg %d: kind: %d, intval: %" PRId64 "]",
|
||||
printf(" [Template arg %d: kind: %d, intval: %lld]",
|
||||
I, TAK, clang_Cursor_getTemplateArgumentValue(Cursor, I));
|
||||
break;
|
||||
default:
|
||||
|
@ -1362,14 +1361,14 @@ static enum CXChildVisitResult PrintTypeSize(CXCursor cursor, CXCursor p,
|
|||
{
|
||||
long long Size = clang_Type_getSizeOf(T);
|
||||
if (Size >= 0 || Size < -1 ) {
|
||||
printf(" [sizeof=%" PRId64 "]", Size);
|
||||
printf(" [sizeof=%lld]", Size);
|
||||
}
|
||||
}
|
||||
/* Print the type alignof if applicable. */
|
||||
{
|
||||
long long Align = clang_Type_getAlignOf(T);
|
||||
if (Align >= 0 || Align < -1) {
|
||||
printf(" [alignof=%" PRId64 "]", Align);
|
||||
printf(" [alignof=%lld]", Align);
|
||||
}
|
||||
}
|
||||
/* Print the record field offset if applicable. */
|
||||
|
@ -1394,10 +1393,10 @@ static enum CXChildVisitResult PrintTypeSize(CXCursor cursor, CXCursor p,
|
|||
FieldName);
|
||||
long long Offset2 = clang_Cursor_getOffsetOfField(cursor);
|
||||
if (Offset == Offset2){
|
||||
printf(" [offsetof=%" PRId64 "]", Offset);
|
||||
printf(" [offsetof=%lld]", Offset);
|
||||
} else {
|
||||
/* Offsets will be different in anonymous records. */
|
||||
printf(" [offsetof=%" PRId64 "/%" PRId64 "]", Offset, Offset2);
|
||||
printf(" [offsetof=%lld/%lld]", Offset, Offset2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4000,7 +3999,7 @@ static int read_diagnostics(const char *filename) {
|
|||
}
|
||||
|
||||
static int perform_print_build_session_timestamp(void) {
|
||||
printf("%" PRId64 "\n", clang_getBuildSessionTimestamp());
|
||||
printf("%lld\n", clang_getBuildSessionTimestamp());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue