projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ae689c
)
CXX [qoi]. Prevent a crash when initializer expression is
author
Fariborz Jahanian
<fjahanian@apple.com>
Wed, 28 Jan 2015 22:08:10 +0000
(22:08 +0000)
committer
Fariborz Jahanian
<fjahanian@apple.com>
Wed, 28 Jan 2015 22:08:10 +0000
(22:08 +0000)
invalid when trying to create temporary copy of the invalid
initializer. rdar://
19109967
llvm-svn: 227378
clang/lib/Sema/SemaInit.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/Sema/SemaInit.cpp
b/clang/lib/Sema/SemaInit.cpp
index
c6d9a54
..
0897467
100644
(file)
--- a/
clang/lib/Sema/SemaInit.cpp
+++ b/
clang/lib/Sema/SemaInit.cpp
@@
-5063,6
+5063,8
@@
static ExprResult CopyObject(Sema &S,
const InitializedEntity &Entity,
ExprResult CurInit,
bool IsExtraneousCopy) {
+ if (CurInit.isInvalid())
+ return CurInit;
// Determine which class type we're copying to.
Expr *CurInitExpr = (Expr *)CurInit.get();
CXXRecordDecl *Class = nullptr;