<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 - Assertion failure in CFGBuilder::findConstructionContexts"
   href="https://bugs.llvm.org/show_bug.cgi?id=37769">37769</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failure in CFGBuilder::findConstructionContexts
          </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>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>noqnoqneo@gmail.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>alexfh@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat ./test-CFGBuilder__findConstructionContexts.cc
class a {
 public:
  a(char);
};
int b(...);
class c {
  int m_fn1() const;
};
int c::m_fn1() const { a d(b(0 ? d : 0)); }
$ ./clang-tidy -checks=-*,clang-analyzer*
test-CFGBuilder__findConstructionContexts.cc -- -std=c++1
assertion failed at llvm/tools/clang/lib/Analysis/CFG.cpp:1311 in void
(anonymous namespace)::CFGBuilder::findConstructionContexts(const
clang::ConstructionContextLayer *, clang::Stmt *):
!CO->getType()->getAsCXXRecordDecl() || CO->isGLValue() ||
Context->getLangOpts().CPlusPlus17
    @     0x55e2fb272596  __assert_fail
    @     0x55e2f9be9b63  (anonymous
namespace)::CFGBuilder::findConstructionContexts()
    @     0x55e2f9bdcf62  (anonymous namespace)::CFGBuilder::Visit()
    @     0x55e2f9be4724  (anonymous namespace)::CFGBuilder::VisitChildren()
    @     0x55e2f9bec55e  (anonymous namespace)::CFGBuilder::VisitDeclSubExpr()
    @     0x55e2f9bded97  (anonymous
namespace)::CFGBuilder::VisitCompoundStmt()
    @     0x55e2f9bd7d98  clang::CFG::buildCFG()
    @     0x55e2f9bcb45b  clang::AnalysisDeclContext::getCFG()
    @     0x55e2f8d0b97e  (anonymous namespace)::AnalysisConsumer::HandleCode()

Seems to have been introduced in <a href="https://reviews.llvm.org/rL330382">https://reviews.llvm.org/rL330382</a>.</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>