<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang-tidy (and possibly other tools) leave temporary files behind"
   href="https://bugs.llvm.org/show_bug.cgi?id=37091">37091</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-tidy (and possibly other tools) leave temporary files behind
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>david.stenberg@ericsson.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>After the following commit was introduced: 

    Author: Ilya Biryukov <<a href="mailto:ibiryukov@google.com">ibiryukov@google.com</a>>
    Date:   Mon Mar 19 14:19:58 2018 +0000

    Changed createTemporaryFile without FD to actually create a file.

    Summary:
    This commit changes semantics of createUniqueFile and
    createTemporaryFile variants that do not return file descriptors.
    Previously they only checked if files exist, therefore being subject
    to race conditions. Now they will create an empty file to avoid them.

    Functions that do not create a file are now called
    getPotentiallyUniqueTempFileName and getPotentiallyUniqueFileName.

    Reviewers: klimek, bkramer, krasimir, JDevlieghere, espindola

    Reviewed By: klimek

    Subscribers: llvm-commits

    Differential Revision: <a href="https://reviews.llvm.org/D36827">https://reviews.llvm.org/D36827</a>

    git-svn-id: <a href="https://llvm.org/svn/llvm-project/llvm/trunk@327851">https://llvm.org/svn/llvm-project/llvm/trunk@327851</a>
91177308-0d34-0410-b5e6-96231b3b80d8

we have encountered cases where clang-tidy leaves behind temporary files. This
might also be the case for other tools, but I have not verified that.

When e.g. running the following:

  ( export TMPDIR=tmpdir; rm -rf $TMPDIR; mkdir $TMPDIR;
    clang-tidy empty-file.c -- --target=mips64 )

a placeholder-*.s file is left in $TMPDIR:

  $ ls tmpdir/
  placeholder-601760.s

A temporary file is created when specifying the following targets: mips64,
mips64el, msp430, nios2, r600, amdgcn, sparc, sparcv9, sparcel, tce, tcele,
xcore, nvptx, nvptx64, le64, spir, spir64, renderscript32, renderscript64.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>