<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 - cannot execute scan-build-7 due to extra <U+200B>"
   href="https://bugs.llvm.org/show_bug.cgi?id=39349">39349</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>cannot execute scan-build-7 due to extra <U+200B>
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Packaging
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>deb packages
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>hannes.franke@smartoptics.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The `scan-build` perl script installed into `/usr/bin/scan-build` contains an
extra unicode-char <U+200B> which trips up the perl interpreter.

To reproduce:
"deb <a href="http://apt.llvm.org/xenial/">http://apt.llvm.org/xenial/</a> llvm-toolchain-xenial-7 main" >
/etc/apt/sources.list.d/llvm-latest.list
apt-get update
apt-get install clang-tools-7
/usr/bin/scan-build-7

Output:

Unrecognized character \xE2; marked by <-- HERE after /]*$)/ or
<-- HERE near column 116 at /usr/bin/scan-build-7 line 1082.


Inspecting the file /usr/bin/scan-build-7 at line 1081-1083 (with e.g. vim or
less)

      $Cmd =~ /(.*\/?llvm-gcc[^\/]*$)/ or
<U+200B>      $Cmd =~ /(.*\/?clang[^\/]*$)/ or
      $Cmd =~ /(.*\/?ccc-analyzer[^\/]*$)/) {

shows the extra <U+200B> 'ZERO WIDTH SPACE' character.
If I remove this character everything works as expected.

It doesn't seem to exist inside the sources themselves, at least the ones
offered for download (<a href="https://releases.llvm.org/download.html#7.0.0">https://releases.llvm.org/download.html#7.0.0</a>), so I
guess it is a packaging-only problem.

The package downloaded is: (snips from apt-get install)
Get:1 <a href="http://apt.llvm.org/xenial">http://apt.llvm.org/xenial</a> llvm-toolchain-xenial-7/main amd64
clang-tools-7 amd64 1:7~svn342187-1~exp1~20180920124227.28
Setting up clang-tools-7 (1:7~svn342187-1~exp1~20180920124227.28)</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>