Add functions declared in ctype.h to builtin function database. All functions are annotated with nothrow and const attribute, which enables better optimization.
Details
Diff Detail
Event Timeline
@joerg My bad. They surely read from globals. I'll fix the diff. Thanks for the catch!
Fix attribute annotation from 'const' to 'pure'. Add support for 'pure' attribute to builtin function database related code. Test case (test/Sema/libbuiltins-ctype.c) added. Line 116 of test/FixIt/typo.m is removed because it is not necessary for test but causes a warning that cannot be addressed by -fixit once isupper is registered to Builtins.def.
LGTM, with one small nit.
include/clang/Basic/Builtins.h | ||
---|---|---|
97 ↗ | (On Diff #53369) | Missing period at the end of the comment. |
Addressing comments from @aaron.ballman. It would be great if someone can commit this patch for me, as I don't have the privilege yet.
I reverted this in r266201; it was causing build bot failures like:
http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/3517
Can you please take a look?
Thanks!