Details
- Reviewers
• Quuxplusone ldionne - Group Reviewers
Restricted Project - Commits
- rGef2cdfe393d0: [libc++][NFC] Remove uses of 'using namespace std;' in the test suite
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/test/libcxx/numerics/c.math/fdelayed-template-parsing.pass.cpp | ||
---|---|---|
27 | This can't possibly have been accidental, can it? What's the subtle point of this test? | |
libcxx/test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp | ||
26 | You don't need the std:: on size_t. (Compare line 29, where you left it off and it was totally fine.) | |
libcxx/test/std/input.output/filesystems/class.path/path.nonmember/swap.pass.cpp | ||
35 | This must have been intentional — trying to verify that we get no ambiguity from lookup finding both std::swap and std::filesystem::swap?? — but in this case I'm fairly sure I understand the issues involved and agree that deleting this line is fine. Alternatively, delete using namespace fs; but keep using namespace std; — then we'd be testing that the "std::swap two-step" correctly works with path the same way it works with other types. Obviously lines 41-42 should be made consistent with whatever you choose to do here. | |
libcxx/test/std/numerics/complex.number/complex.literals/literals2.pass.cpp | ||
10 | :shipit: | |
libcxx/test/std/strings/basic.string.literals/literal3.pass.cpp | ||
1 | No, this one is 100% intentional. Compare literal1.cpp. | |
libcxx/test/std/strings/string.view/string_view.literals/literal3.pass.cpp | ||
1 | Ditto. | |
libcxx/test/support/any_helpers.h | ||
93 | Oho. This double-using idiom must date back to when std::experimental::any_cast was a thing. We don't have to worry about that anymore, right? |
Address comments
libcxx/test/libcxx/numerics/c.math/fdelayed-template-parsing.pass.cpp | ||
---|---|---|
27 | Indeed, good catch. I did some archeology and improved the comment at the top instead. | |
libcxx/test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp | ||
26 | When I include <cxxxxx>, I use the stuff in namespace std:: as a matter of consistency. | |
libcxx/test/std/input.output/filesystems/class.path/path.nonmember/swap.pass.cpp | ||
35 | I actually added a test that checks the swap two-step but also left this one. | |
libcxx/test/std/strings/basic.string.literals/literal3.pass.cpp | ||
1 | Hmm, right indeed -- I went a bit quickly with this patch, thanks for looking at it diligently. I fixed it, look in the next update. | |
libcxx/test/support/any_helpers.h | ||
93 | Right, that was my thinking too. |
This can't possibly have been accidental, can it? What's the subtle point of this test?