__builtin_sin() and friends not compiling?


I noticed this comment in lib/CodeGen/CGBuiltin.cpp:

  // If this is an alias for a libm function (e.g. __builtin_sin) turn
it into
  // that function.
  if (getContext().BuiltinInfo.isLibFunction(BuiltinID) ||
    return EmitCall(CGM.getBuiltinLibFunction(FD, BuiltinID),
                    E->getCallee()->getType(), E->arg_begin(),

But this is what I find in include/clang/Basic/Builtins.def:

// Standard unary libc/libm functions with double/float/long double
BUILTIN(__builtin_acos , "dd" , "nc")
BUILTIN(__builtin_tanl, "LdLd", "nc")

So none of these builtins that should be marked as LibFunctions or
PredefinedLibFunctions are marked as such. Is there a good reason for
this? Because when I try to use one of them, I get an error:

$ cat t.c
int main(void)
  return 0;

$ clang t.c
t.c:3:2: error: cannot compile this builtin function yet
1 diagnostic generated.

Should I file a PR?


Looks like a simple oversight, I fixed this in r90736, thanks!