summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-10-10 08:27:19 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-10-10 08:27:19 +0000
commit82cc9641f72327ba269ae730a789d8840cd50ba7 (patch)
treeeafeeae7587340e59c81a3bc0745509161cfa0b4 /llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp
parent45465191968616a0966522d66fca358b56d51e2d (diff)
downloadbcm5719-llvm-82cc9641f72327ba269ae730a789d8840cd50ba7.tar.gz
bcm5719-llvm-82cc9641f72327ba269ae730a789d8840cd50ba7.zip
Don't use an unqualified 'abs' function call with a builtin type.
This is dangerous for numerous reasons. The primary risk here is with floating point or double types where if the wrong header files are included in a strange order this can implicitly convert to integers and then call the C abs function on the integers. There is a secondary risk that even impacts integers where if the namespace the code is written in ever defines an abs overload for types within that namespace the global abs will be hidden. The correct form is to call std::abs or write 'using std::abs' for builtin types (and only the latter is correct in any generic context). I've also added the requisite header to be a bit more explicit here. llvm-svn: 219484
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud