diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-04 15:30:25 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-04 15:30:25 +0200 |
commit | ba69cf5f0d916c4fdc943f2171691e074417f2e8 (patch) | |
tree | ef067cbb4b80f51aed20953c651ce16f7a4e1f31 | |
parent | 1a3926d3096691f6ee218f574afb635e5b5d56ca (diff) |
Skip lambda type declarations injected into namespace scope
-rw-r--r-- | odb/parser.cxx | 12 |
1 files 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: |