aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/LoopPass.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
commit7eb0b2c1819cc71c57902d239fdde62727dffade (patch)
tree25dfeb11568fcdfb2840abb77edcd416fc038887 /llvm/lib/Analysis/LoopPass.cpp
parent5500b07c786b0bd6cff10a8fb8080591653b2750 (diff)
downloadllvm-7eb0b2c1819cc71c57902d239fdde62727dffade.zip
llvm-7eb0b2c1819cc71c57902d239fdde62727dffade.tar.gz
llvm-7eb0b2c1819cc71c57902d239fdde62727dffade.tar.bz2
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. llvm-svn: 202211
Diffstat (limited to 'llvm/lib/Analysis/LoopPass.cpp')
0 files changed, 0 insertions, 0 deletions