diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-10 16:14:06 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-10 16:14:06 +0000 |
commit | b5e4ace3161bd2c3f88f39e228ba8f6aaa15e751 (patch) | |
tree | 9f2b5082ba6952a5a15c1116bde3fa1154cdd311 /lib/Sema/SemaDeclCXX.cpp | |
parent | ff2fb961dcaa3988ef3efe9fa0f1b12d3f093162 (diff) |
Fix stack overflow when trying to create an implicit moving
constructor with invalid code.
rdar://12240916
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165623 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index c898d81a61..12452b2429 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -8154,7 +8154,7 @@ hasMoveOrIsTriviallyCopyable(Sema &S, QualType Type, bool IsConstructor) { // reference types, are supposed to return false here, but that appears // to be a standard defect. CXXRecordDecl *ClassDecl = Type->getAsCXXRecordDecl(); - if (!ClassDecl || !ClassDecl->getDefinition()) + if (!ClassDecl || !ClassDecl->getDefinition() || ClassDecl->isInvalidDecl()) return true; if (Type.isTriviallyCopyableType(S.Context)) |