From cb9dde664175235414497dbe4b3c90c2d6dc32b7 Mon Sep 17 00:00:00 2001 From: malte_langkabel Date: Tue, 17 May 2016 16:30:26 +0200 Subject: [PATCH] logic: fix local symbols in lambda * fixed the isImplicit method of the ASTVisitor to use the parent context to determine if a lambda record is implicit. --- src/lib_parser/data/parser/cxx/ASTVisitor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib_parser/data/parser/cxx/ASTVisitor.cpp b/src/lib_parser/data/parser/cxx/ASTVisitor.cpp index 649a2c0f..2c0c3aed 100644 --- a/src/lib_parser/data/parser/cxx/ASTVisitor.cpp +++ b/src/lib_parser/data/parser/cxx/ASTVisitor.cpp @@ -1452,6 +1452,13 @@ bool ASTVisitor::isImplicit(clang::Decl* d) const if (d->isImplicit()) { + if (clang::RecordDecl* rd = clang::dyn_cast_or_null(d)) + { + if (rd->isLambda()) + { + return isImplicit(clang::dyn_cast_or_null(d->getDeclContext())); + } + } return true; } else if (clang::ClassTemplateSpecializationDecl* ctsd = clang::dyn_cast_or_null(d))