Browse Source

Fixed a bug in the parser thus removing the necessity for a hack we had.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/661/head
Dimitar Dobrev 10 years ago
parent
commit
f45fcc26a2
  1. 5
      src/CppParser/Parser.cpp

5
src/CppParser/Parser.cpp

@ -3264,20 +3264,17 @@ Declaration* Parser::WalkDeclaration(const clang::Decl* D,
TypeAlias->DescribedAliasTemplate = WalkTypeAliasTemplate(TAT); TypeAlias->DescribedAliasTemplate = WalkTypeAliasTemplate(TAT);
Decl = TypeAlias; Decl = TypeAlias;
break;
} }
case Decl::Namespace: case Decl::Namespace:
{ {
auto ND = cast<NamespaceDecl>(D); auto ND = cast<NamespaceDecl>(D);
// HACK: work around https://llvm.org/bugs/show_bug.cgi?id=28397
if (D->getKind() != Decl::Kind::TypeAlias)
{
for (auto it = ND->decls_begin(); it != ND->decls_end(); ++it) for (auto it = ND->decls_begin(); it != ND->decls_end(); ++it)
{ {
clang::Decl* D = (*it); clang::Decl* D = (*it);
Decl = WalkDeclarationDef(D); Decl = WalkDeclarationDef(D);
} }
}
break; break;
} }

Loading…
Cancel
Save