From 2fd5983e0da447291a651a347c206aee37a1de5f Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 8 Feb 2012 08:11:33 +0000 Subject: Implement DR1458: Taking the address of an object of incomplete class type is not a constant expression, because we can't tell whether the complete class type will have an overloaded operator&. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150066 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticASTKinds.td | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/clang/Basic/DiagnosticASTKinds.td') diff --git a/include/clang/Basic/DiagnosticASTKinds.td b/include/clang/Basic/DiagnosticASTKinds.td index 9e4b63cfe8..978df36f9f 100644 --- a/include/clang/Basic/DiagnosticASTKinds.td +++ b/include/clang/Basic/DiagnosticASTKinds.td @@ -55,6 +55,9 @@ def note_constexpr_pointer_comparison_differing_access : Note< "specifiers (%1 vs %3) has unspecified value">; def note_constexpr_compare_virtual_mem_ptr : Note< "comparison of pointer to virtual member function %0 has unspecified value">; +def note_constexpr_addr_of_incomplete : Note< + "cannot take address of object of incomplete class type %0 " + "in a constant expression">; def note_constexpr_past_end : Note< "dereferenced pointer past the end of %select{|subobject of }0" "%select{temporary|%2}1 is not a constant expression">; -- cgit v1.2.3