On 10.12.2014 01:00, Sean Callanan wrote:
> + LinkageSpecDecl *ToLinkageSpec =
> LinkageSpecDecl::Create(Importer.getToContext(),
> + DC,
> + ExternLoc,
> + LangLoc,
> + D->getLanguage(),
> + HasBraces);
> +
> + if (HasBraces) {
> + SourceLocation RBraceLoc = Importer.Import(D->getRBraceLoc());
> + ToLinkageSpec->setRBraceLoc(RBraceLoc);
> + }
This can result in braceless LinkageSpecDecls without child decl when a
redeclaration is imported:
extern "C" void foo();
extern "C" void foo();
The DeclContext of the second decl is imported before the ASTImporter
looks up and returns the first decl, leaving the DeclContext empty.
I'm not sure how bad such empty LinkageSpecDecls are, but I've found
parts in clang that assert against it, like decl-printing.
-Nico
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits