diff options
author | Gabor Marton <gabor.marton@ericsson.com> | 2020-12-09 21:40:53 +0100 |
---|---|---|
committer | Gabor Marton <gabor.marton@ericsson.com> | 2020-12-14 18:27:05 +0100 |
commit | 68f53960e17d93c3a2727164dac4e54140bd98ba (patch) | |
tree | 9cdea67b51c4a3d0f266dd25021b049c34240157 /clang/lib/Lex/ModuleMap.cpp | |
parent | 59560e85897afc50090b6c3d920bacfd28b49d06 (diff) | |
download | llvm-68f53960e17d93c3a2727164dac4e54140bd98ba.zip llvm-68f53960e17d93c3a2727164dac4e54140bd98ba.tar.gz llvm-68f53960e17d93c3a2727164dac4e54140bd98ba.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions