diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-24 00:30:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-24 00:30:45 +0000 |
commit | 1efaa9594a81709a17658fd80ae7e783e1026407 (patch) | |
tree | 5806d33ade9e5b52bfb494a9efe4ea29f52a2566 /lib/Sema/SemaType.cpp | |
parent | 8b9fb3082bc54cf7ffe6c3772500a73388f53072 (diff) |
Fix rdar://6821047 - clang crashes on subscript of interface in 64-bit mode
Several changes here:
1. We change Type::isIncompleteType to realize that forward declared
interfaces are incomplete. This eliminate special case code for this
from the sizeof path, and starts us rejecting P[4] when P is a pointer
to an incomplete interface.
2. Explicitly reject P[4] when P points to an interface in non-fragile ABI
mode.
3. Switch the sizeof(interface) diagnostic back to an error instead of a
warning in non-fragile abi mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 50f5071306..62d2489b34 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -1060,8 +1060,8 @@ void Sema::ProcessTypeAttributeList(QualType &Result, const AttributeList *AL) { /// @returns @c true if @p T is incomplete and a diagnostic was emitted, /// @c false otherwise. bool Sema::RequireCompleteType(SourceLocation Loc, QualType T, unsigned diag, - SourceRange Range1, SourceRange Range2, - QualType PrintType) { + SourceRange Range1, SourceRange Range2, + QualType PrintType) { // If we have a complete type, we're done. if (!T->isIncompleteType()) return false; |