This is an archive of the discontinued LLVM Phabricator instance.

[clang][ASTImporter] Fix import of VarDecl regarding thread local storage spec
ClosedPublic

Authored by steakhal on Mar 16 2021, 7:06 AM.

Details

Summary

After the import, we did not copy the TSCSpec.
This commit resolves that.

Diff Detail

Event Timeline

steakhal created this revision.Mar 16 2021, 7:06 AM
steakhal requested review of this revision.Mar 16 2021, 7:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 16 2021, 7:06 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Looks good, just find a better place for the test.

clang/unittests/AST/ASTImporterTest.cpp
817

The test can be moved to better place, probably after line 3481 and use ImportVariables. At least I want it not between two related tests, here between ImportUsingDecl and ImportUsingShadowDecl.

steakhal updated this revision to Diff 331191.Mar 17 2021, 2:41 AM

Moved to line 3481, changed the test logic accordingly.

steakhal marked an inline comment as done.Mar 17 2021, 2:42 AM

I did not notice that ImportVariables is different than ImportDecl, I like the first version of the test better (with ImportDecl) (but the current is not wrong), can you change it back only at a different position (line 738 can be good, before test "ImportRecordTypeInFunc")?

steakhal updated this revision to Diff 331302.Mar 17 2021, 10:06 AM

Revert to the previous version and move to line 738 just before "ImportRecordTypeInFunc".

balazske accepted this revision.Mar 18 2021, 12:29 AM
This revision is now accepted and ready to land.Mar 18 2021, 12:29 AM