aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-11-01 21:10:29 +0000
committerDouglas Gregor <dgregor@apple.com>2010-11-01 21:10:29 +0000
commit19cc1c715e97885f10b3496f91d0a8ae24642faa (patch)
tree47211b60b4de4f6c6f9c38e759a7207dfb5ed713 /lib/Sema/SemaExprCXX.cpp
parentde5b17ea3c74d2844ed035a1edfa6479866139b5 (diff)
Harden Sema::MaybeBindTotemporary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117954 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r--lib/Sema/SemaExprCXX.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 2e5293d84f..63e1a24cfa 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -2933,6 +2933,9 @@ QualType Sema::FindCompositePointerType(SourceLocation Loc,
}
ExprResult Sema::MaybeBindToTemporary(Expr *E) {
+ if (!E)
+ return ExprError();
+
if (!Context.getLangOptions().CPlusPlus)
return Owned(E);