diff options
author | Petr Pavlu <petr.pavlu@arm.com> | 2018-10-04 09:25:44 +0000 |
---|---|---|
committer | Petr Pavlu <petr.pavlu@arm.com> | 2018-10-04 09:25:44 +0000 |
commit | fedf7909ee64d739dde5639e9e01598acdb83d8c (patch) | |
tree | 40827c1cd1a9d76bd93957f47b52fa0a744a4838 /include/clang/Basic/DiagnosticASTKinds.td | |
parent | f80073d763e01f0449a46daac1e000a5bc25d9b0 (diff) |
[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
Diffstat (limited to 'include/clang/Basic/DiagnosticASTKinds.td')
-rw-r--r-- | include/clang/Basic/DiagnosticASTKinds.td | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticASTKinds.td b/include/clang/Basic/DiagnosticASTKinds.td index db4a9421e3..47a0f3e0a1 100644 --- a/include/clang/Basic/DiagnosticASTKinds.td +++ b/include/clang/Basic/DiagnosticASTKinds.td @@ -173,6 +173,9 @@ def note_constexpr_memcpy_type_pun : Note< def note_constexpr_memcpy_nontrivial : Note< "cannot constant evaluate '%select{memcpy|memmove}0' between objects of " "non-trivially-copyable type %1">; +def note_constexpr_memcpy_incomplete_type : Note< + "cannot constant evaluate '%select{memcpy|memmove}0' between objects of " + "incomplete type %1">; def note_constexpr_memcpy_overlap : Note< "'%select{memcpy|wmemcpy}0' between overlapping memory regions">; def note_constexpr_memcpy_unsupported : Note< |