aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-12-13 00:37:17 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-12-13 00:37:17 +0000
commit206491dcbe1ed01ee8ce86a0ffe272d5d25491d3 (patch)
tree90720c306ea42030cc6fe6c3f6362e7549d3e364 /lib/Sema/SemaExprCXX.cpp
parent0fdcd1e81db7b8f5b3fd05154d966b215b20a2eb (diff)
Add missing check for error return from DefaultLvalueConversion. Fixes <rdar://problem/12857416>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170056 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r--lib/Sema/SemaExprCXX.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 5345e8d8e9..e3df0a3275 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -2026,6 +2026,8 @@ Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal,
if (!Ex.get()->isTypeDependent()) {
// Perform lvalue-to-rvalue cast, if needed.
Ex = DefaultLvalueConversion(Ex.take());
+ if (Ex.isInvalid())
+ return ExprError();
QualType Type = Ex.get()->getType();