[llvm-bugs] [Bug 39201] New: False positive in Catch2 2.4.1
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Oct 6 09:14:20 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=39201
Bug ID: 39201
Summary: False positive in Catch2 2.4.1
Product: clang
Version: 7.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: dcoughlin at apple.com
Reporter: marejde at gmail.com
CC: llvm-bugs at lists.llvm.org
See https://github.com/catchorg/Catch2/issues/1230 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;
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181006/0490ee66/attachment.html>
More information about the llvm-bugs
mailing list