From ba69cf5f0d916c4fdc943f2171691e074417f2e8 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 4 May 2020 15:30:25 +0200 Subject: Skip lambda type declarations injected into namespace scope --- odb/parser.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/odb/parser.cxx b/odb/parser.cxx index 7286fca..69d9b28 100644 --- a/odb/parser.cxx +++ b/odb/parser.cxx @@ -890,15 +890,23 @@ collect (tree ns) { case TYPE_DECL: { - if (DECL_NAME (decl) != NULL_TREE) - decls_.insert (decl); + // Skip special type declarations. + // + if (DECL_NAME (decl) == NULL_TREE) + continue; + tree type (TREE_TYPE (decl)); + if (LAMBDA_TYPE_P (type)) + continue; + + decls_.insert (decl); break; } case TEMPLATE_DECL: { if (DECL_CLASS_TEMPLATE_P (decl)) decls_.insert (decl); + break; } default: -- cgit v1.1