diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-10-02 01:13:57 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-10-02 01:13:57 +0000 |
commit | 5e18f4db08dc4df3d91869cea1c39810b3e0c83b (patch) | |
tree | 2a5ee05947509aa203a06c47bad69a9fef8d8b26 /clang/lib/AST/ExprConstant.cpp | |
parent | 86f864dacee0c1c65841723e84503ff1927bf28a (diff) | |
download | bcm5719-llvm-5e18f4db08dc4df3d91869cea1c39810b3e0c83b.tar.gz bcm5719-llvm-5e18f4db08dc4df3d91869cea1c39810b3e0c83b.zip |
Fix crash on constant-evaluation of pseudo-destruction of a pointer.
We got confused and thought we might be pseudo-destroying the pointee
instead.
llvm-svn: 373418
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index cf28ecbe5ff..92ea1c93000 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -3997,7 +3997,7 @@ static bool handleIncDec(EvalInfo &Info, const Expr *E, const LValue &LVal, /// Build an lvalue for the object argument of a member function call. static bool EvaluateObjectArgument(EvalInfo &Info, const Expr *Object, LValue &This) { - if (Object->getType()->isPointerType()) + if (Object->getType()->isPointerType() && Object->isRValue()) return EvaluatePointer(Object, This, Info); if (Object->isGLValue()) |