This is an archive of the discontinued LLVM Phabricator instance.

Fix for internal compiler error when calling __builtin_signbit with invalid arguments
Needs ReviewPublic

Authored by jseba on Aug 15 2017, 4:21 PM.

Details

Reviewers
rsmith
Summary

Clang has had a regression since version 3.8 where calls to __builtin_signbit (and friends signbitf & signbitl) without passing any arguments would cause it to segfault because it didn't abort compilation, even though it would properly flag the function call as having too few arguments passed in. This patch fixes the issue by including signbit in the checks for floating point parameters during semantic checks for builtin functions, same as isnan or isinf.

This addresses https://bugs.llvm.org/show_bug.cgi?id=28653 and https://bugs.llvm.org/show_bug.cgi?id=28653

Diff Detail

Event Timeline

jseba created this revision.Aug 15 2017, 4:21 PM