summaryrefslogtreecommitdiff
path: root/lib/Basic/FileSystemStatCache.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2014-02-26 01:17:28 +0000
committerRichard Trieu <rtrieu@google.com>2014-02-26 01:17:28 +0000
commit4a7f7947a3f66658d68926182842e08d40d93d45 (patch)
treeb29a7fcf3e27dd699fc4f002ddba2b4e215cb873 /lib/Basic/FileSystemStatCache.cpp
parent23eb67333460fca42cc99892eb69e1fe24e5f93a (diff)
downloadclang-4a7f7947a3f66658d68926182842e08d40d93d45.tar.gz
clang-4a7f7947a3f66658d68926182842e08d40d93d45.tar.bz2
clang-4a7f7947a3f66658d68926182842e08d40d93d45.tar.xz
Add -Wabsolute-value, warnings about absolute value functions.
The warnings fall into three groups. 1) Using an absolute value function of the wrong type, for instance, using the int absolute value function when the argument is a floating point type. 2) Using the improper sized absolute value function, for instance, using abs when the argument is a long long. llabs should be used instead. From these two cases, an implicit conversion will occur which may cause unexpected behavior. Where possible, suggest the proper absolute value function to use, and which header to include if the function is not available. 3) Taking the absolute value of an unsigned value. In addition to this warning, suggest to remove the function call. This usually indicates a logic error since the programmer assumed negative values would have been possible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202211 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/FileSystemStatCache.cpp')
0 files changed, 0 insertions, 0 deletions