<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 - False positive in Catch2 2.4.1"
   href="https://bugs.llvm.org/show_bug.cgi?id=39201">39201</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>False positive in Catch2 2.4.1
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>7.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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Static Analyzer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dcoughlin@apple.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>marejde@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>See <a href="https://github.com/catchorg/Catch2/issues/1230">https://github.com/catchorg/Catch2/issues/1230</a> for more details. Closed by
Catch2 maintainer since deemed to be false positive in Clang's analyzer.

There is a report.zip in the GH issue (have not looked at it myself).

Excerpt from my own run when analyzing a file that does #include
<catch2/catch.hpp> and uses the REQUIRE macro:

/usr/include/catch2/catch.hpp:13808:24: note: expanded from macro 'REQUIRE'
#define REQUIRE( ... ) INTERNAL_CATCH_TEST( "REQUIRE",
Catch::ResultDisposition::Normal, __VA_ARGS__  )
                       ^
/usr/include/catch2/catch.hpp:1869:33: note: expanded from macro
'INTERNAL_CATCH_TEST'
        Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr,
CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__),
resultDisposition ); \
                                ^
/usr/include/catch2/catch.hpp:5550:26: note: Calling 'getResultCapture'
        m_resultCapture( getResultCapture() )
                         ^
/usr/include/catch2/catch.hpp:9867:29: note: Calling 'getCurrentContext'
        if (auto* capture = getCurrentContext().getResultCapture())
                            ^
/usr/include/catch2/catch.hpp:5254:16: note: Calling 'getCurrentMutableContext'
        return getCurrentMutableContext();
               ^
/usr/include/catch2/catch.hpp:5247:13: note: Assuming 'currentContext' is null
        if( !IMutableContext::currentContext )
            ^
/usr/include/catch2/catch.hpp:5247:13: note: Assuming pointer value is null
/usr/include/catch2/catch.hpp:5247:9: note: Taking true branch
        if( !IMutableContext::currentContext )
        ^
/usr/include/catch2/catch.hpp:5249:9: note: Returning null reference
        return *IMutableContext::currentContext;</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>