This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Need to include <memory> for std::unique_ptr.
ClosedPublic

Authored by STL_MSFT on Apr 28 2016, 5:09 PM.

Details

Summary

[libcxx] [test] Need to include <memory> for std::unique_ptr.

Fixes MSVC "error C2039: 'unique_ptr': is not a member of 'std'".

Diff Detail

Event Timeline

STL_MSFT updated this revision to Diff 55508.Apr 28 2016, 5:09 PM
STL_MSFT retitled this revision from to [libcxx] [test] Need to include <memory> for std::unique_ptr..
STL_MSFT updated this object.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

It'll be good idea to run Include What You Use to make sure that all dependencies are explicit.

EricWF accepted this revision.Apr 28 2016, 5:42 PM
EricWF edited edge metadata.

Woops. My bad.

This revision is now accepted and ready to land.Apr 28 2016, 5:42 PM
EricWF closed this revision.Apr 28 2016, 5:43 PM

r267958.

rsmith added a subscriber: rsmith.Apr 28 2016, 5:58 PM

It'll be good idea to run Include What You Use to make sure that all dependencies are explicit.

You can also remove all the export *s from the module map and try running the testsuite with modules enabled for a nasty shock about how common this problem is...

It'll be good idea to run Include What You Use to make sure that all dependencies are explicit.

You can also remove all the export *s from the module map and try running the testsuite with modules enabled for a nasty shock about how common this problem is...

Most tests pretty much rely on <type_traits> getting dragged in indirectly, same thing with <memory> and the bits of <utility> we actually define in <type_traits>.

I was hoping that maybe "Include What You Use" had a fix-it mode. I'll look into this further tonight.

I was hoping that maybe "Include What You Use" had a fix-it mode. I'll look into this further tonight.

It has fix_includes.py script, but I encountered quite a lot of false positives, so I prefer to fix problems manually.

Most tests pretty much rely on <type_traits> getting dragged in indirectly, same thing with <memory> and the bits of <utility> we actually define in <type_traits>.

There are also a few symbols that libc++ defines in the wrong header and then #includes into the right one. Any automated fix is going to mess up on those.

Most tests pretty much rely on <type_traits> getting dragged in indirectly, same thing with <memory> and the bits of <utility> we actually define in <type_traits>.

There are also a few symbols that libc++ defines in the wrong header and then #includes into the right one. Any automated fix is going to mess up on those.

Ah, I stupidly assumed that the automatic fix would handle "std::" symbols based off of the spec and not the implementation.