diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2014-08-28 04:28:19 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2014-08-28 04:28:19 +0000 |
commit | 39c81e281629886bfa491434e31516b2056d0985 (patch) | |
tree | b0b1ff5b7d83d851e804aad3c20379024760bb7b /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | c5cafbb074d216d6fa6bc5beb05f236e736490d2 (diff) | |
download | bcm5719-llvm-39c81e281629886bfa491434e31516b2056d0985.tar.gz bcm5719-llvm-39c81e281629886bfa491434e31516b2056d0985.zip |
[C++11] Support for capturing of variable length arrays in lambda expression.
Differential Revision: http://reviews.llvm.org/D4368
llvm-svn: 216649
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 0b20f541b68..d55b646c7f5 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -852,12 +852,11 @@ CollectRecordLambdaFields(const CXXRecordDecl *CXXDecl, C.getLocation(), Field->getAccess(), layout.getFieldOffset(fieldno), VUnit, RecordTy); elements.push_back(fieldType); - } else { + } else if (C.capturesThis()) { // TODO: Need to handle 'this' in some way by probably renaming the // this of the lambda class and having a field member of 'this' or // by using AT_object_pointer for the function and having that be // used as 'this' for semantic references. - assert(C.capturesThis() && "Field that isn't captured and isn't this?"); FieldDecl *f = *Field; llvm::DIFile VUnit = getOrCreateFile(f->getLocation()); QualType type = f->getType(); |