Re-land r362766 after it was reverted in r362823.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
This patch must land before https://reviews.llvm.org/D62275 in which I use set_difference() on StringSet
I'm not sure I know enough about LLVM's ADT classes to be able to properly review this (on the surface the code looks fine though), so I've added a few reviewers who have worked on some of the *Set classes in the past according to the history. If you don't hear back from any of them by the end of next week, ping me and I'll take a look.
llvm/unittests/ADT/SetOperationsTest.cpp | ||
---|---|---|
1–29 ↗ | (On Diff #201132) | This test probably should go where other StringSet tests are (presumably unittests/ADT/StringSetTest) - and I would /generally/ be in favor of not 'integration testing' that set_difference works with StringSet, but that StringSet exposes the appropriate kind of iterators/operations that set_difference requires in general? Oh, I see, this llvm::set_difference doesn't just wrap std::set_difference, so it has different interface requirements. I'd /probably/ still test the surface area of StringSet directly - and certainly feel like code changes to StringSet would be tested in StringSet's tests. |
Incorporated feedback from @dblaikie to change test name from SetOperationsTest.cpp to StringSetTest.cpp and moved an existing StringSet test from StringMapTest.cpp to new file StringSetTest.cpp.
llvm/unittests/ADT/StringSetTest.cpp | ||
---|---|---|
33–42 ↗ | (On Diff #201342) | I'd still prefer this as two unit tests for the two new functions you added (& the test wouldn't use set_difference at all - unit tests being what they are, try to test things in isolation) - but I'll leave it up to you. No big deal (: |
Incorporate feedback from @dblaikie to call insert(StringMapEntry) and count(StringMapEntry) instead of set_difference(StringSet, StringSet) in StringSetTest.cpp, which better adheres to the spirit of unit-testing.
Yes, please commit for me. I just requested commit access by email to Chris on Friday. No response yet so I assume I don't have access, which is fine because helpful people like you can do it for me while I wait. Thanks! :)
Yeah, had my local client tangled up with some other work for a bit so I haven't got to committing this - but if @mmpozulp has commit access now - then, yeah, he should go ahead and commit it so the author information's more accurate, etc.
I'm fighting with svn. I ran svn co https://user@llvm.org/svn/llvm-project/llvm/trunk llvm which took about 90 minutes to checkout the repo. If I run svn up it hangs for ~10 minutes on a poll() call (which I discovered by running strace) then emits an error
$ svn up Updating '.': svn: E175002: REPORT of '/svn/llvm-project/!svn/vcc/default': Could not read status line: Secure connection truncated (https://llvm.org)
I'm running svn 1.7.14
$ svn --version svn, version 1.7.14 (r1542130)
Good news! Apparently I can commit from git (https://llvm.org/docs/GettingStarted.html#for-developers-to-commit-changes-from-git). Thank you, @smeenai!!! I should be able to land this commit soon. Good-bye svn :)
@dblaikie approved the stack-buffer-overflow fix (see https://reviews.llvm.org/D63000) which I have applied here, so I'm going to re-land this patch :)