summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/TimeValueTest.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-02-26 19:12:28 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-02-26 19:12:28 +0000
commit51a184058dce16539cab86c4db94e259bc9aca99 (patch)
treec632d64bc0455aa7b979d880125c374a859c5add /llvm/unittests/Support/TimeValueTest.cpp
parent994f63dc00255f191c9d726cc6e199dd66be1366 (diff)
downloadbcm5719-llvm-51a184058dce16539cab86c4db94e259bc9aca99.tar.gz
bcm5719-llvm-51a184058dce16539cab86c4db94e259bc9aca99.zip
Use the overloaded std::abs rather than C's abs(int) to address Clang's -Wabsolute-value
llvm-svn: 202286
Diffstat (limited to 'llvm/unittests/Support/TimeValueTest.cpp')
-rw-r--r--llvm/unittests/Support/TimeValueTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/Support/TimeValueTest.cpp b/llvm/unittests/Support/TimeValueTest.cpp
index e0368d3d409..8058812ff4e 100644
--- a/llvm/unittests/Support/TimeValueTest.cpp
+++ b/llvm/unittests/Support/TimeValueTest.cpp
@@ -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) {
OpenPOWER on IntegriCloud