<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in swap.pass.cpp</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>2df59c50 - Support tests in freestanding</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/swap.pass.cpp#2df59c50</link>
        <description>Support tests in freestandingSummary:Freestanding is *weird*. The standard allows it to differ in a bunch of oddmanners from regular C++, and the committee would like to improve thatsituation. I&apos;d like to make libc++ behave better with what freestanding shouldbe, so that it can be a tool we use in improving the standard. To do that weneed to try stuff out, both with &quot;freestanding the language mode&quot; and&quot;freestanding the library subset&quot;.Let&apos;s start with the super basic: run the libc++ tests in freestanding, usingclang as the compiler, and see what works. The easiest hack to do this:In utils/libcxx/test/config.py add:  self.cxx.compile_flags += [&apos;-ffreestanding&apos;]Run the tests and they all fail.Why? Because in freestanding `main` isn&apos;t special. This &quot;not special&quot; propertyhas two effects: main doesn&apos;t get mangled, and main isn&apos;t allowed to omit its`return` statement. The first means main gets mangled and the linker can&apos;tcreate a valid executable for us to test. The second means we spew out warnings(ew) and the compiler doesn&apos;t insert the `return` we omitted, and main justfalls of the end and does whatever undefined behavior (if you&apos;re luck, ud2leading to non-zero return code).Let&apos;s start my work with the basics. This patch changes all libc++ tests todeclare `main` as `int main(int, char**` so it mangles consistently (enabling usto declare another `extern &quot;C&quot;` main for freestanding which calls the mangledone), and adds `return 0;` to all places where it was missing. This touches 6124files, and I apologize.The former was done with The Magic Of Sed.The later was done with a (not quite correct but decent) clang tool:  https://gist.github.com/jfbastien/793819ff360baa845483dde81170feedThis works for most tests, though I did have to adjust a few places when e.g.the test runs with `-x c`, macros are used for main (such as for the filesystemtests), etc.Once this is in we can create a freestanding bot which will prevent furtherregressions. After that, we can start the real work of supporting C++freestanding fairly well in libc++.&lt;rdar://problem/47754795&gt;Reviewers: ldionne, mclow.lists, EricWFSubscribers: christof, jkorous, dexonsmith, arphaman, miyuki, libcxx-commitsDifferential Revision: https://reviews.llvm.org/D57624llvm-svn: 353086

            List of files:
            /llvm-project-15.0.7/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/swap.pass.cpp</description>
        <pubDate>Mon, 04 Feb 2019 20:31:13 +0000</pubDate>
        <dc:creator>JF Bastien &lt;jfbastien@apple.com&gt;</dc:creator>
    </item>
<item>
        <title>57b08b09 - Update more file headers across all of the LLVM projects in the monorepo</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/swap.pass.cpp#57b08b09</link>
        <description>Update more file headers across all of the LLVM projects in the monorepoto reflect the new license. These used slightly different spellings thatdefeated my regular expressions.We understand that people may be surprised that we&apos;re moving the headerentirely to discuss the new license. We checked this carefully with theFoundation&apos;s lawyer and we believe this is the correct approach.Essentially, all code in the project is now made available by the LLVMproject under our new license, so you will see that the license headersinclude that license only. Some of our contributors have contributedcode under our old license, and accordingly, we have retained a copy ofour old license notice in the top-level files in each project andrepository.llvm-svn: 351648

            List of files:
            /llvm-project-15.0.7/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/swap.pass.cpp</description>
        <pubDate>Sat, 19 Jan 2019 10:56:40 +0000</pubDate>
        <dc:creator>Chandler Carruth &lt;chandlerc@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>2561885f - Rewrite and cleanup unique_ptr tests.</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/swap.pass.cpp#2561885f</link>
        <description>Rewrite and cleanup unique_ptr tests.This patch almost entirely rewrites the unique_ptr tests. There are a coupleof reasons for this:A) Most of the *.fail.cpp tests were either incorrect or could be better written  as a *.pass.cpp test that uses &lt;type_traits&gt; to check if certain operations  are valid (Ex. Using static_assert(!std::is_copy_constructible_v&lt;T&gt;) instead  of writing a failure test).B) [unique.ptr.runtime] has very poor test coverage. Many of the constructors  and assignment operators have to tests at all. The special members that have  tests have very few test cases and are typically way out of date.C) The tests for [unique.ptr.single] and [unique.ptr.runtime] are largely  duplicates of each other. This means common requirements have two different  sets of tests in two different test files. This makes the tests harder to  maintain than if there was a single copy.To address (A) this patch changes almost all of the *.fail.cpp tests into.pass.cpp tests using type traits; Allowing the *.fail.cpp tests to be removed.The address (B) and (C) the tests for [unique.ptr.single] and [unique.ptr.runtime]have been combined into a single directory, allowing both specializations to sharecommon tests. Tests specific to the single/runtime specializations are given thesuffix &quot;*.single.pass.cpp&quot; or &quot;*.runtime.pass.cpp&quot;.Finally the unique.ptr test have been moved into the correct directory accordingto the standard. Specifically they have been removed from &quot;utilities/memory&quot; into&quot;utilities/smartptr&quot;.PS. This patch also adds newly written tests for upcoming unique_ptr changes/fixes.However since these tests don&apos;t currently pass they are guarded by the macroTEST_WORKAROUND_UPCOMING_UNIQUE_PTR_CHANGES. This allows other STL&apos;s to validatethe tests before libc++ implements the changes. The relevant libc++ changes shouldland in the next week.llvm-svn: 300388

            List of files:
            /llvm-project-15.0.7/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/swap.pass.cpp</description>
        <pubDate>Sat, 15 Apr 2017 05:28:06 +0000</pubDate>
        <dc:creator>Eric Fiselier &lt;eric@efcs.ca&gt;</dc:creator>
    </item>
</channel>
</rss>
