diff options
author | dim <dim@FreeBSD.org> | 2015-12-25 14:26:58 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-12-25 14:26:58 +0000 |
commit | 1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c (patch) | |
tree | 31a414b9b5f25347b7ed9a8786c34bdb277d6127 /lib/Sema/SemaExprCXX.cpp | |
parent | 4238dc458ed9a048965af111b979fd51d288f22c (diff) | |
download | FreeBSD-src-1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c.zip FreeBSD-src-1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c.tar.gz |
Import clang 3.7.1 release (r255217).
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 01966d5..9ad5aa5 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -2485,8 +2485,10 @@ bool MismatchingNewDeleteDetector::hasMatchingNewInCtor( MismatchingNewDeleteDetector::MismatchResult MismatchingNewDeleteDetector::analyzeInClassInitializer() { assert(Field != nullptr && "This should be called only for members"); - if (const CXXNewExpr *NE = - getNewExprFromInitListOrExpr(Field->getInClassInitializer())) { + const Expr *InitExpr = Field->getInClassInitializer(); + if (!InitExpr) + return EndOfTU ? NoMismatch : AnalyzeLater; + if (const CXXNewExpr *NE = getNewExprFromInitListOrExpr(InitExpr)) { if (NE->isArray() != IsArrayForm) { NewExprs.push_back(NE); return MemberInitMismatches; |