summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/DiagnosticASTKinds.td
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-09-13 22:47:33 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-09-13 22:47:33 +0000
commitb50bc3665d6b9751917b923e89bd21e92e1206ba (patch)
tree4eaa957d27324fc1357699ef94f1c6747fb71daa /include/clang/Basic/DiagnosticASTKinds.td
parenta497c8fddd5c18b3f5788412f4043891c833d92c (diff)
Fix crash on call to __builtin_memcpy with a null pointer to an
incomplete type. Also improve the diagnostics for similar situations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342192 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticASTKinds.td')
-rw-r--r--include/clang/Basic/DiagnosticASTKinds.td4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticASTKinds.td b/include/clang/Basic/DiagnosticASTKinds.td
index 3358fc3d70..db4a9421e3 100644
--- a/include/clang/Basic/DiagnosticASTKinds.td
+++ b/include/clang/Basic/DiagnosticASTKinds.td
@@ -163,6 +163,10 @@ def note_constexpr_unsupported_unsized_array : Note<
def note_constexpr_unsized_array_indexed : Note<
"indexing of array without known bound is not allowed "
"in a constant expression">;
+def note_constexpr_memcpy_null : Note<
+ "%select{source|destination}2 of "
+ "'%select{%select{memcpy|wmemcpy}1|%select{memmove|wmemmove}1}0' "
+ "is %3">;
def note_constexpr_memcpy_type_pun : Note<
"cannot constant evaluate '%select{memcpy|memmove}0' from object of "
"type %1 to object of type %2">;