diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-09-27 01:26:47 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-09-27 01:26:47 +0000 |
| commit | da1b4347e41aa5bf76cb2151318bf5917bc9ee99 (patch) | |
| tree | 7829d85bf015172a77e6c6b5d0a547bff4900062 /clang/lib/AST/ExprCXX.cpp | |
| parent | c336557f0238dba72718e499bb345d0dd87305fc (diff) | |
| download | bcm5719-llvm-da1b4347e41aa5bf76cb2151318bf5917bc9ee99.tar.gz bcm5719-llvm-da1b4347e41aa5bf76cb2151318bf5917bc9ee99.zip | |
For P0784R7: Add support for dynamic allocation with new / delete during
constant evaluation.
llvm-svn: 373036
Diffstat (limited to 'clang/lib/AST/ExprCXX.cpp')
| -rw-r--r-- | clang/lib/AST/ExprCXX.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/AST/ExprCXX.cpp b/clang/lib/AST/ExprCXX.cpp index c5f86a4cc12..30c28314d5b 100644 --- a/clang/lib/AST/ExprCXX.cpp +++ b/clang/lib/AST/ExprCXX.cpp @@ -124,6 +124,8 @@ CXXNewExpr::CXXNewExpr(bool IsGlobalNew, FunctionDecl *OperatorNew, if (ArraySize) { if (Expr *SizeExpr = *ArraySize) { + if (SizeExpr->isValueDependent()) + ExprBits.ValueDependent = true; if (SizeExpr->isInstantiationDependent()) ExprBits.InstantiationDependent = true; if (SizeExpr->containsUnexpandedParameterPack()) @@ -134,6 +136,8 @@ CXXNewExpr::CXXNewExpr(bool IsGlobalNew, FunctionDecl *OperatorNew, } if (Initializer) { + if (Initializer->isValueDependent()) + ExprBits.ValueDependent = true; if (Initializer->isInstantiationDependent()) ExprBits.InstantiationDependent = true; if (Initializer->containsUnexpandedParameterPack()) @@ -143,6 +147,8 @@ CXXNewExpr::CXXNewExpr(bool IsGlobalNew, FunctionDecl *OperatorNew, } for (unsigned I = 0; I != PlacementArgs.size(); ++I) { + if (PlacementArgs[I]->isValueDependent()) + ExprBits.ValueDependent = true; if (PlacementArgs[I]->isInstantiationDependent()) ExprBits.InstantiationDependent = true; if (PlacementArgs[I]->containsUnexpandedParameterPack()) |

