summaryrefslogtreecommitdiff
path: root/unittests
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
commit3ae2abb11ef7224ab84a5cfb23a5703e5af4f85a (patch)
tree2ffa4bc7d40a3d93cf4ce2f0279eef7c7ca1309f /unittests
parenta55b3dfdc618c7b6730790cddf20be212296d192 (diff)
downloadllvm-3ae2abb11ef7224ab84a5cfb23a5703e5af4f85a.tar.gz
llvm-3ae2abb11ef7224ab84a5cfb23a5703e5af4f85a.tar.bz2
llvm-3ae2abb11ef7224ab84a5cfb23a5703e5af4f85a.tar.xz
Use the overloaded std::abs rather than C's abs(int) to address Clang's -Wabsolute-value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202286 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Support/TimeValueTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/unittests/Support/TimeValueTest.cpp b/unittests/Support/TimeValueTest.cpp
index e0368d3d40..8058812ff4 100644
--- a/unittests/Support/TimeValueTest.cpp
+++ b/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) {