]> granicus.if.org Git - clang/commit
[constexpr] Fix ICE when memcpy() is given a pointer to an incomplete array
authorPetr Pavlu <petr.pavlu@arm.com>
Thu, 4 Oct 2018 09:25:44 +0000 (09:25 +0000)
committerPetr Pavlu <petr.pavlu@arm.com>
Thu, 4 Oct 2018 09:25:44 +0000 (09:25 +0000)
commitfedf7909ee64d739dde5639e9e01598acdb83d8c
tree40827c1cd1a9d76bd93957f47b52fa0a744a4838
parentf80073d763e01f0449a46daac1e000a5bc25d9b0
[constexpr] Fix ICE when memcpy() is given a pointer to an incomplete array

Fix code for constant evaluation of __builtin_memcpy() and
__builtin_memmove() that would attempt to divide by zero when given two
pointers to an incomplete array.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343761 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticASTKinds.td
lib/AST/ExprConstant.cpp
test/CodeGen/builtin-memfns.c
test/SemaCXX/constexpr-string.cpp