diff options
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index cdec049cb1..7ca936abc9 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -1313,8 +1313,7 @@ void VarDecl::setInit(Expr *I) { } bool VarDecl::extendsLifetimeOfTemporary() const { - if (!getType()->isReferenceType()) - return false; + assert(getType()->isReferenceType() &&"Non-references never extend lifetime"); const Expr *E = getInit(); if (!E) |