aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-01-08 23:40:08 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-01-08 23:40:08 +0000
commit4b3040f51a96248fa34ba14cf54914d361142bd7 (patch)
tree6de652e05658bfe77c77cf6722284c4656942a46 /lib/Sema/SemaExpr.cpp
parent456cfc0010ceb785f1e41735935302884b8b4250 (diff)
Remove lambda from my last patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171915 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 326c59a365..352be07f1a 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -10762,13 +10762,10 @@ bool Sema::tryCaptureVariable(VarDecl *Var, SourceLocation Loc,
// Prohibit structs with flexiable array members too.
// We cannot capture what is in the tail end of the struct.
if (const RecordType *VTTy = Var->getType()->getAs<RecordType>()) {
- if (VTTy->getDecl()->hasFlexibleArrayMember()) {
+ if (VTTy->getDecl()->hasFlexibleArrayMember() && IsBlock) {
if (BuildAndDiagnose) {
if (IsBlock)
Diag(Loc, diag::err_ref_flexarray_type);
- else
- Diag(Loc, diag::err_lambda_capture_flexarray_type)
- << Var->getDeclName();
Diag(Var->getLocation(), diag::note_previous_decl)
<< Var->getDeclName();
}