<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 - MatchFinder constructor causes segfault"
   href="https://bugs.llvm.org/show_bug.cgi?id=36384">36384</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MatchFinder constructor causes segfault
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </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>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jacques@nag.co.uk
          </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=19863" name="attach_19863" title="Small test code">attachment 19863</a> <a href="attachment.cgi?id=19863&action=edit" title="Small test code">[details]</a></span>
Small test code

I'm sure this is not a bug but a user error/config issue, but I thought I'd
report anyway.  This is against current trunk of LLVM/clang (see version number
below)

Can someone just check that this code compiles and runs without segfaulting?

Compile with 

clang++ -O0 -g -std=c++11 -fno-exceptions -fno-rtti
-I${path/to/clang/build}/lib/clang/7.0.0/include
-I${path/to/clang/build}/include main.cpp -o a.out -lLLVMSupport -lpthread
-ltinfo -lclangFrontend  -lclangSerialization -lclangDriver -lclangParse
-lclangSema -lclangAnalysis  -lclangEdit -lclangAST -lclangLex -lclangBasic
-lclangTooling -lclangToolingCore -lclangFormat  -lclangRewrite
-lclangASTMatchers

Run on any source file.

My setup:
clang version 7.0.0 (trunk 324074)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang version 7.0.0 (trunk 324074)
Target: x86_64-unknown-linux-gnu
Thread model: posix

gcc (Ubuntu 5.4.0-6ubuntu1~16.04.6) 5.4.0 20160609



Clang built with

cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=${path/to/clang/build} -DLLVM_TARGETS_TO_BUILD="X86"
-DBUILD_SHARED_LIBS=true .. 

using gcc</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>