aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-12-07 00:41:46 +0000
committerDouglas Gregor <dgregor@apple.com>2010-12-07 00:41:46 +0000
commit53c374f1ac6d28b2341b3a8f3902eb51db9c50e7 (patch)
tree2dc0bb930ae69f39eab9365e38cdde5bb927d307 /lib/Sema/SemaExpr.cpp
parent7ee90d0d9ecd6010bb6c7ad252d04b32f07877d5 (diff)
Use Sema::MaybeCreateExprWithCleanups() only after we've checked for a NULL/invalid expression
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index a1ea57ebcf..9038750591 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -2278,7 +2278,7 @@ Sema::BuildDeclarationNameExpr(const CXXScopeSpec &SS,
SourceLocation(),
Owned(E));
if (!Res.isInvalid()) {
- Res = MaybeCreateExprWithCleanups(Res.get());
+ Res = MaybeCreateExprWithCleanups(Res);
Expr *Init = Res.takeAs<Expr>();
BDRE->setCopyConstructorExpr(Init);
}