From 5a0ef78cd7d4651ffe4bfd74d202fa8c98afbd65 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 27 Jun 2013 21:43:17 +0000 Subject: Remove bogus VarDecl::extendsLifetimeOfTemporary function and inline it into its only caller with a FIXME explaining why it's bogus. llvm-svn: 185109 --- clang/lib/AST/Decl.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'clang/lib/AST') diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index adba897bb50..5267789643d 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -1928,19 +1928,6 @@ bool VarDecl::checkInitIsICE() const { return Eval->IsICE; } -bool VarDecl::extendsLifetimeOfTemporary() const { - assert(getType()->isReferenceType() &&"Non-references never extend lifetime"); - - const Expr *E = getInit(); - if (!E) - return false; - - if (const ExprWithCleanups *Cleanups = dyn_cast(E)) - E = Cleanups->getSubExpr(); - - return isa(E); -} - VarDecl *VarDecl::getInstantiatedFromStaticDataMember() const { if (MemberSpecializationInfo *MSI = getMemberSpecializationInfo()) return cast(MSI->getInstantiatedFrom()); -- cgit v1.2.3