r200718 - Fix a -Wformat warning in ASTUnit.cpp
Reid Kleckner
reid at kleckner.net
Mon Feb 3 14:20:25 PST 2014
Author: rnk
Date: Mon Feb 3 16:20:24 2014
New Revision: 200718
URL: http://llvm.org/viewvc/llvm-project?rev=200718&view=rev
Log:
Fix a -Wformat warning in ASTUnit.cpp
llvm::sys::cas_flag is 'long' instead of 'uint32_t' on win32, because
that's what InterlockedIncrement is defined to accept.
I still don't know if we should be calling fprintf from ASTUnit.cpp
behind a getenv check.
Modified:
cfe/trunk/lib/Frontend/ASTUnit.cpp
Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=200718&r1=200717&r2=200718&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Mon Feb 3 16:20:24 2014
@@ -233,7 +233,7 @@ ASTUnit::ASTUnit(bool _MainFileIsAST)
UnsafeToFree(false) {
if (getenv("LIBCLANG_OBJTRACKING")) {
llvm::sys::AtomicIncrement(&ActiveASTUnitObjects);
- fprintf(stderr, "+++ %d translation units\n", ActiveASTUnitObjects);
+ fprintf(stderr, "+++ %d translation units\n", (int)ActiveASTUnitObjects);
}
}
@@ -269,7 +269,7 @@ ASTUnit::~ASTUnit() {
if (getenv("LIBCLANG_OBJTRACKING")) {
llvm::sys::AtomicDecrement(&ActiveASTUnitObjects);
- fprintf(stderr, "--- %d translation units\n", ActiveASTUnitObjects);
+ fprintf(stderr, "--- %d translation units\n", (int)ActiveASTUnitObjects);
}
}
More information about the cfe-commits
mailing list