diff options
Diffstat (limited to 'lib/AST')
-rw-r--r-- | lib/AST/DeclCXX.cpp | 5 | ||||
-rw-r--r-- | lib/AST/ExprCXX.cpp | 4 | ||||
-rw-r--r-- | lib/AST/ExprConstant.cpp | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp index 5cab488822515..1caceab85eea6 100644 --- a/lib/AST/DeclCXX.cpp +++ b/lib/AST/DeclCXX.cpp @@ -1837,9 +1837,10 @@ bool CXXMethodDecl::hasInlineBody() const { const FunctionDecl *CheckFn = getTemplateInstantiationPattern(); if (!CheckFn) CheckFn = this; - + const FunctionDecl *fn; - return CheckFn->hasBody(fn) && !fn->isOutOfLine(); + return CheckFn->isDefined(fn) && !fn->isOutOfLine() && + (fn->doesThisDeclarationHaveABody() || fn->willHaveBody()); } bool CXXMethodDecl::isLambdaStaticInvoker() const { diff --git a/lib/AST/ExprCXX.cpp b/lib/AST/ExprCXX.cpp index 6713fca04571d..fe45b5e47f36d 100644 --- a/lib/AST/ExprCXX.cpp +++ b/lib/AST/ExprCXX.cpp @@ -1052,7 +1052,9 @@ CXXUnresolvedConstructExpr::CXXUnresolvedConstructExpr(TypeSourceInfo *Type, :Type->getType()->isRValueReferenceType()? VK_XValue :VK_RValue), OK_Ordinary, - Type->getType()->isDependentType(), true, true, + Type->getType()->isDependentType() || + Type->getType()->getContainedDeducedType(), + true, true, Type->getType()->containsUnexpandedParameterPack()), Type(Type), LParenLoc(LParenLoc), diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 0c0c861e5d567..a26b608082f52 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -9788,6 +9788,8 @@ public: bool Success(const APValue &V, const Expr *e) { return true; } + bool ZeroInitialization(const Expr *E) { return true; } + bool VisitCastExpr(const CastExpr *E) { switch (E->getCastKind()) { default: |