diff options
author | John McCall <rjmccall@apple.com> | 2013-05-06 07:40:34 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2013-05-06 07:40:34 +0000 |
commit | 10f6f065456a2cfb6c2ab5dfedefb930e5e52e9d (patch) | |
tree | 6576c188ece19da725ee49abf51aa026366a80dd /include/clang | |
parent | 692eafd2052fb6ca581530d6f3569eea9520a508 (diff) |
Require the containing type to be complete when we see
__alignof__ of a field.
This problem can only happen in C++11.
Also do some petty optimizations.
rdar://13784901
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 23e4edf09d..bc0640eaa7 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -4054,6 +4054,8 @@ def err_sizeof_alignof_incomplete_type : Error< "incomplete type %1">; def err_sizeof_alignof_bitfield : Error< "invalid application of '%select{sizeof|alignof}0' to bit-field">; +def err_alignof_member_of_incomplete_type : Error< + "invalid application of 'alignof' to a field of a class still being defined">; def err_vecstep_non_scalar_vector_type : Error< "'vec_step' requires built-in scalar or vector type, %0 invalid">; def err_offsetof_incomplete_type : Error< |