aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-07-29 14:44:35 +0000
committerDouglas Gregor <dgregor@apple.com>2010-07-29 14:44:35 +0000
commit254a9427ff84d694724fdecd0642dad8ceaa0645 (patch)
tree0ce9ca3ec0e257ad3b067e3e8ec3b8abc6fe66b2 /lib
parent0333296d142d45bf2723635848928815b7491f91 (diff)
When deleting a value of class type, make sure that type is complete
before looking for conversions to pointer type. Fixes <rdar://problem/8248780>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109749 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaExprCXX.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 0fe46ed607..d9f7c13f3d 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -1360,6 +1360,10 @@ Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal,
QualType Type = Ex->getType();
if (const RecordType *Record = Type->getAs<RecordType>()) {
+ if (RequireCompleteType(StartLoc, Type,
+ PDiag(diag::err_delete_incomplete_class_type)))
+ return ExprError();
+
llvm::SmallVector<CXXConversionDecl*, 4> ObjectPtrConversions;
CXXRecordDecl *RD = cast<CXXRecordDecl>(Record->getDecl());