[ASTImporter] Fix import of a typedef that has an attribute
The import of a typedefs with an attribute uses clang::Decl::setAttrs(). But that needs the ASTContext which we can get only from the TranslationUnitDecl. But we can get the TUDecl only thourgh the DeclContext, which is not set by the time of the setAttrs call. Fix: import the attributes only after the DC is surely imported. Btw, having the attribute import initiated from GetImportedOrCreateDecl was fundamentally flawed. Now that is implicitly fixed. Differential Revision: https://reviews.llvm.org/D92962
Loading
Please sign in to comment