diff options
Diffstat (limited to 'lib/AST/ExprCXX.cpp')
-rw-r--r-- | lib/AST/ExprCXX.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/ExprCXX.cpp b/lib/AST/ExprCXX.cpp index 3dac125990..966c1fe6a7 100644 --- a/lib/AST/ExprCXX.cpp +++ b/lib/AST/ExprCXX.cpp @@ -100,6 +100,10 @@ void CXXNewExpr::AllocateArgsArray(ASTContext &C, bool isArray, SubExprs = new (C) Stmt*[TotalSize]; } +bool CXXNewExpr::shouldNullCheckAllocation() const { + return getOperatorNew()->getType()-> + castAs<FunctionProtoType>()->hasNonThrowingExceptionSpec(); +} // CXXDeleteExpr QualType CXXDeleteExpr::getDestroyedType() const { |