[llvm] r202286 - Use the overloaded std::abs rather than C's abs(int) to address Clang's -Wabsolute-value
David Blaikie
dblaikie at gmail.com
Wed Feb 26 11:12:29 PST 2014
Author: dblaikie
Date: Wed Feb 26 13:12:28 2014
New Revision: 202286
URL: http://llvm.org/viewvc/llvm-project?rev=202286&view=rev
Log:
Use the overloaded std::abs rather than C's abs(int) to address Clang's -Wabsolute-value
Modified:
llvm/trunk/unittests/Support/TimeValueTest.cpp
Modified: llvm/trunk/unittests/Support/TimeValueTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/TimeValueTest.cpp?rev=202286&r1=202285&r2=202286&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/TimeValueTest.cpp (original)
+++ llvm/trunk/unittests/Support/TimeValueTest.cpp Wed Feb 26 13:12:28 2014
@@ -17,7 +17,7 @@ namespace {
TEST(TimeValue, time_t) {
sys::TimeValue now = sys::TimeValue::now();
time_t now_t = time(NULL);
- EXPECT_TRUE(abs(static_cast<long>(now_t - now.toEpochTime())) < 2);
+ EXPECT_TRUE(std::abs(static_cast<long>(now_t - now.toEpochTime())) < 2);
}
TEST(TimeValue, Win32FILETIME) {
More information about the llvm-commits
mailing list