<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 - ASTMatchers.h imposes link-dependency on LLVMFrontendOpenMP"
   href="https://bugs.llvm.org/show_bug.cgi?id=48191">48191</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ASTMatchers.h imposes link-dependency on LLVMFrontendOpenMP
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>11.0
          </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>Tooling
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>anton.kreuzkamp@kdab.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=24165" name="attach_24165" title="CMakeLists.txt used to setup compilation for minimal example">attachment 24165</a> <a href="attachment.cgi?id=24165&action=edit" title="CMakeLists.txt used to setup compilation for minimal example">[details]</a></span>
CMakeLists.txt used to setup compilation for minimal example

One could argue whether this is a bug, but it seems at least unintended that
since clang 11.0 ASTMatchers.h imposes a dependency on libLLVMFrontendOpenMP. 

I.e. apparently any clang tool that uses AST matchers must link against
libLLVMFrontendOpenMP.

Attached is a minimal example to reproduce the bug. It's an empty program,
doing nothing but #include "ASTMatchers.h". It's then linked against clang-cpp
and LLVMCore, which should be enough and was enough with clang 10. Now it gives
a linker error.

This can be worked around, by adding `LLVMFrontendOpenMP` to the list of linked
libraries.</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>