]> granicus.if.org Git - clang/commit
[CodeGen] fix const-ness of builtin equivalents of <math.h> and <complex.h> functions...
authorSanjay Patel <spatel@rotateright.com>
Thu, 2 Nov 2017 20:39:26 +0000 (20:39 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 2 Nov 2017 20:39:26 +0000 (20:39 +0000)
commit603490dae39300a191e0485ce192a46176267397
tree80266299cf37a0a5ae90ef008d4f5d83d669ec55
parentde0289c4685fc6f78767d6257a3a17467bcf6783
[CodeGen] fix const-ness of builtin equivalents of <math.h> and <complex.h> functions that might set errno

This just makes const-ness of the builtins match const-ness of their lib function siblings.
We're deferring fixing some of these that are obviously wrong to follow-up patches.
Hopefully, the bugs are visible in the new test file (added at rL317220).

As the description in Builtins.def says: "e = const, but only when -fmath-errno=0".

This is step 2 of N to fix builtins and math calls as discussed in D39204.

Differential Revision: https://reviews.llvm.org/D39481

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317265 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/Builtins.def
test/CodeGen/builtin-errno.c
test/CodeGen/builtin-sqrt.c