<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/133577>133577</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang][test] clang/test/Driver/amdgpu-toolchain.c weak regexp causes false negatives
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          pawosm-arm
      </td>
    </tr>
</table>

<pre>
    The following check in the `amdgpu-toolchain.c` file causes false negatives:

```
// RELO-NOT: -shared
```

The problem occurs when `-shared` is a part of the build directory name, e.g. `build-shared-llvm-project-debug`, see:

```
clang/test/Driver/amdgpu-toolchain.c:36:14: error: RELO-NOT: excluded string found in input
// RELO-NOT: -shared
 ^
<stdin>:4:74: note: found here
InstalledDir: ~/upstream/build-shared-llvm-project-debug/bin
 ^~~~~~~

Input file: <stdin>
Check file: clang/test/Driver/amdgpu-toolchain.c
```

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUk99q4zoQxp9GvhEJyihOmgtfuEkNhcMpLH0BWRrb2sqS0Z-kvemzL1JTtrt0KTUCC6SZ-b6fZkQIerSIDalvSX2qRIqT880iLi7MK-HnqnfqpXmckA7OGHfRdqRyQvlEtaVxQkp2TMxqXNIqOmfkJLRdS7JjdNAGqRQpYKCDMAGpxVFEfcZAeEtYWTt2Xawl0BHo6I-7_x5W_z88Et7SVZiER_X3RdZmPYt3vcGZOimTD_Qyoc1i3mN2jOpABV2Ej9QNRWuftFFUaY8yOv9CrZiRwJHielzn2HJ-TbAy5jyvFu9-oowrhX0ac3k40oD4qQFphB0JdBFDJNCdvD6jJ9B9goe3fEd4u9lml-i983nz0To-S5MUKhqiz8wHl6zKzLVdUvwKFyX1Xb7DjyEqbQm_I7zNxfalonUxW7gmndAjYe29DVEYg-qki5pXAl1aQvQoZgLdV2yg67W9ln4t3xuh-6y3NENO-lERa4-lkd7PvsHvT_CVarg68IOosNnstxy2nB-gmho-1AOHLeNCiRtxA6KXQoHq6_4gYS_2lW6AQc04HDZss-OwBtlDv9vgXm22cKMGsmU4C23W2fHa-bHSISRsNpzX-31lRI8mlOEBuOqHPEe-KYj6NAayZUaHGH6niDqaMnFvEfWJ1LfFdH36BgR6QfFEPY74vPxjzqrkTTPFuJSJKw0z6jilfi1dftOs6Pp7f00CXXEYCHRXk-cGfgUAAP__Rx9Phw">