[PATCH] PR20958 Allow redeclaration of type-generic builtins
charlie.turner at arm.com
Thu May 21 07:43:19 PDT 2015
This patch allows the user to declare the C99 math builtins that take the generic "real-floating" argument types.
A use case is described in https://llvm.org/bugs/show_bug.cgi?id=20958
In C++98 and C89, you may redeclare these builtins to take any type, Clang will pretend these don't exist in these languages.
In C++11 and C99 (and derivations thereof), you can only redeclare the builtin with types that are "real-floating". If you try to redeclare with different types, a diagnostic is produced.
I also tweaked the __noop builtin to specify that it's arguments are custom type-checked. This was avoid a semantic error about passing non-POD types through a variadic argument, which is not appropriate for that builtin.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 13481 bytes
Desc: not available
More information about the cfe-commits