<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    This one seems to be fixed by the second patch and is looks similar
    to the testcase that's already there -
    <a class="moz-txt-link-freetext" href="https://reviews.llvm.org/D59622">https://reviews.llvm.org/D59622</a><br>
    <br>
    Different backtraces are moderately expected :)<br>
    <br>
    <div class="moz-cite-prefix">On 3/21/19 6:58 AM, Alexander Kornienko
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOweq9JOb0+KMXKEgLpg262-RwDDa+mx_L_LG_X1JrEbG9sbWA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">Thanks for the fix! Meanwhile, I found a couple
          of code samples that trigger this assertion with a slightly
          different stack trace. Not sure if they are substantially
          different though. </div>
        <div dir="ltr"><br>
        </div>
        <div dir="ltr">#1:<br>
          <div>
            <div>$ cat t.cc</div>
            <div>inline namespace a {</div>
            <div>class b typedef c;</div>
            <div>}</div>
            <div>class A {};</div>
            <div>namespace a {</div>
            <div>class b : A {};</div>
            <div>}  // namespace a</div>
            <div>class d {</div>
            <div> public:</div>
            <div>  operator c();</div>
            <div>};</div>
            <div>d e() { c f{e()}; }</div>
            <div>$ clang-tidy -checks="-*,clang-analyzer*" t.cc --
              -std=c++17</div>
            <div>assert.h assertion failed at
              llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp:2362
              in (anonymous namespace)::RegionBindingsRef (anonymous
              namespace)::RegionStoreManager::bindStruct(RegionBindingsConstRef,
              const clang::ento::TypedValueRegion *, clang::ento::SVal):
              CRD->isAggregate() && "Non-aggregates are
              constructed with a constructor!"</div>
            <div>    @     0x5605d5ca35c6  __assert_fail<br>
            </div>
            <div>    @     0x5605d44064e4  (anonymous
              namespace)::RegionStoreManager::bindStruct()</div>
            <div>    @     0x5605d43fb058  (anonymous
              namespace)::RegionStoreManager::Bind()</div>
            <div>    @     0x5605d43e5d2f 
              clang::ento::ProgramState::bindLoc()</div>
            <div>    @     0x5605d43975c5 
              clang::ento::ExprEngine::processPointerEscapedOnBind()</div>
            <div>    @     0x5605d438f143 
              clang::ento::ExprEngine::evalBind()</div>
            <div>    @     0x5605d43a46d3 
              clang::ento::ExprEngine::VisitDeclStmt()</div>
            <div>    @     0x5605d438ddff 
              clang::ento::ExprEngine::Visit()</div>
            <div>    @     0x5605d438a7af 
              clang::ento::ExprEngine::ProcessStmt()</div>
            <div>    @     0x5605d438a498 
              clang::ento::ExprEngine::processCFGElement()</div>
            <div>    @     0x5605d437e7f5 
              clang::ento::CoreEngine::HandlePostStmt()</div>
            <div>    @     0x5605d437dbec 
              clang::ento::CoreEngine::ExecuteWorkList()</div>
            <div>    @     0x5605d40e7feb  (anonymous
              namespace)::AnalysisConsumer::HandleCode()</div>
            <div>    @     0x5605d40d1dc5  (anonymous
              namespace)::AnalysisConsumer::HandleTranslationUnit()</div>
            <div>    @     0x5605d46ea43c 
              clang::MultiplexConsumer::HandleTranslationUnit()</div>
            <div>    @     0x5605d4854e54  clang::ParseAST()</div>
            <div>    @     0x5605d46cb203 
              clang::FrontendAction::Execute()</div>
            <div>    @     0x5605d4664451 
              clang::CompilerInstance::ExecuteAction()</div>
            <div>    @     0x5605d45cef61 
              clang::tooling::FrontendActionFactory::runInvocation()</div>
            <div>    @     0x5605d3d3e997 
              clang::tidy::runClangTidy()::ActionFactory::runInvocation()</div>
            <div>    @     0x5605d45cecca 
              clang::tooling::ToolInvocation::runInvocation()</div>
            <div>    @     0x5605d45ce646 
              clang::tooling::ToolInvocation::run()</div>
            <div>    @     0x5605d45d0f22 
              clang::tooling::ClangTool::run()</div>
            <div>    @     0x5605d3d39c5f  clang::tidy::runClangTidy()</div>
            <div>    @     0x5605d0860c45  main</div>
            <div><br>
            </div>
            <div>#2 is still being reduced.</div>
            <div><br>
            </div>
          </div>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Wed, Mar 20, 2019 at 2:37
          AM Artem Dergachev <<a href="mailto:noqnoqneo@gmail.com"
            target="_blank" moz-do-not-send="true">noqnoqneo@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On
          3/19/19 11:10 AM, Richard Smith wrote:<br>
          > It sounds like there might be a missing check for <br>
          > InitListExpr::isTransparent somewhere. (A transparent
          InitListExpr <br>
          > should be treated as equivalent to its one and only
          subexpression.) <br>
          > Either that, or the static analyzer isn't aware that an
          object of <br>
          > class type can be initialized directly from a function
          call, not via a <br>
          > constructor.<br>
          <br>
          Indeed, thanks! And, as usual, more bugs on top of that.<br>
          (<a href="https://reviews.llvm.org/D59573" rel="noreferrer"
            target="_blank" moz-do-not-send="true">https://reviews.llvm.org/D59573</a>)<br>
          <br>
          On 3/19/19 11:00 AM, Alexander Kornienko wrote:<br>
          > just adding -std=c++17 on existing code (LLVM, for
          example ;) could <br>
          > help uncover some of the issues<br>
          <br>
          Hmm, fair enough :D I'm glad i asked :)<br>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>