aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-02-25 02:00:27 +0000
committerDouglas Gregor <dgregor@apple.com>2010-02-25 02:00:27 +0000
commitf316a1d40bf224f16576b9b1727003d2259399f9 (patch)
treeecd432a2354641cb35d989181480d15e46020a19
parenta2e7dd2f4a50d835351153aee568d35ccc986310 (diff)
Remove some oogly code made dead by the pseudo-destructor
instantiation changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97095 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Sema/SemaExpr.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 71aae736b1..b074381b51 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -2900,50 +2900,6 @@ Sema::LookupMemberExpr(LookupResult &R, Expr *&BaseExpr,
return Owned((Expr*) 0);
}
- // Handle pseudo-destructors (C++ [expr.pseudo]). Since anything referring
- // into a record type was handled above, any destructor we see here is a
- // pseudo-destructor.
- if (MemberName.getNameKind() == DeclarationName::CXXDestructorName) {
- // C++ [expr.pseudo]p2:
- // The left hand side of the dot operator shall be of scalar type. The
- // left hand side of the arrow operator shall be of pointer to scalar
- // type.
- if (!BaseType->isScalarType())
- return Owned(Diag(OpLoc, diag::err_pseudo_dtor_base_not_scalar)
- << BaseType << BaseExpr->getSourceRange());
-
- // [...] The type designated by the pseudo-destructor-name shall be the
- // same as the object type.
- if (!MemberName.getCXXNameType()->isDependentType() &&
- !Context.hasSameUnqualifiedType(BaseType, MemberName.getCXXNameType()))
- return Owned(Diag(OpLoc, diag::err_pseudo_dtor_type_mismatch)
- << BaseType << MemberName.getCXXNameType()
- << BaseExpr->getSourceRange() << SourceRange(MemberLoc));
-
- // [...] Furthermore, the two type-names in a pseudo-destructor-name of
- // the form
- //
- // ::[opt] nested-name-specifier[opt] type-name :: ̃ type-name
- //
- // shall designate the same scalar type.
- //
- // FIXME: DPG can't see any way to trigger this particular clause, so it
- // isn't checked here.
-
- // FIXME: We've lost the precise spelling of the type by going through
- // DeclarationName. Can we do better?
- TypeSourceInfo *DestroyedTypeInfo
- = Context.getTrivialTypeSourceInfo(MemberName.getCXXNameType(),
- MemberLoc);
- return Owned(new (Context) CXXPseudoDestructorExpr(Context, BaseExpr,
- IsArrow, OpLoc,
- (NestedNameSpecifier *) SS.getScopeRep(),
- SS.getRange(),
- 0, SourceLocation(),
- MemberLoc,
- DestroyedTypeInfo));
- }
-
// Handle access to Objective-C instance variables, such as "Obj->ivar" and
// (*Obj).ivar.
if ((IsArrow && BaseType->isObjCObjectPointerType()) ||