<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 clang::BodyFarm::getBody()"
   href="https://bugs.llvm.org/show_bug.cgi?id=34869">34869</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failure in clang::BodyFarm::getBody()
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>ekarpenkov@apple.com
          </td>
        </tr>

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

        <tr>
          <th>CC</th>
          <td>dcoughlin@apple.com, ganna@apple.com, kremenek@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Static analyzer has recently (between r314418 and r314622) started generating a
variety of assertion failures that have one thing in common: there's
clang::BodyFarm::getBody() on the stack. I'm working on an isolated repro, but
in case someone finds an obvious issue, here's an example of a failure stack
trace:

assert.h assertion failed at llvm/tools/clang/include/clang/AST/Expr.h:137 in
void clang::Expr::setType(clang::QualType): (t.isNull() ||
!t->isReferenceType()) && "Expressions can't have reference type"
    @          0x52cf23a  __assert_fail
    @          0x14d3009  clang::Expr::setType()
    @          0x1fc0125  clang::Expr::Expr()
    @          0x2f1de70  clang::DeclRefExpr::DeclRefExpr()
    @          0x2f1e5de  clang::DeclRefExpr::Create()
    @          0x2f1e382  clang::DeclRefExpr::Create()
    @          0x2ad45ac  (anonymous namespace)::ASTMaker::makeDeclRefExpr()
    @          0x2ad4a54  (anonymous namespace)::ASTMaker::makeLvalueToRvalue()
    @          0x2ad320e  create_call_once()
    @          0x2ad2b00  clang::BodyFarm::getBody()
    @          0x2ab426f  clang::AnalysisDeclContext::getBody()
    @          0x2ab44b9  clang::AnalysisDeclContext::isBodyAutosynthesized()
    @           0xf369ab  (anonymous namespace)::AnalysisConsumer::HandleCode()
    @           0xf7e62d  (anonymous
namespace)::AnalysisConsumer::VisitFunctionDecl()
    @           0xf7df55 
clang::RecursiveASTVisitor<>::WalkUpFromFunctionDecl()
    @           0xf2f632  clang::RecursiveASTVisitor<>::TraverseFunctionDecl()
    @           0xf29983  clang::RecursiveASTVisitor<>::TraverseDecl()
    @           0xf283c1  (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit()
    @          0x136023e  clang::MultiplexConsumer::HandleTranslationUnit()
    @          0x1dbb5d6  clang::ParseAST()
    @          0x134daea  clang::ASTFrontendAction::ExecuteAction()
    @          0x134d580  clang::FrontendAction::Execute()
    @          0x1162b82  clang::CompilerInstance::ExecuteAction()
    @          0x102bcf2 
clang::tooling::FrontendActionFactory::runInvocation()
    @          0x102bb93  clang::tooling::ToolInvocation::runInvocation()
    @          0x102a456  clang::tooling::ToolInvocation::run()
    @          0x102cd80  clang::tooling::ClangTool::run()
    @           0x897ff4  clang::tidy::runClangTidy()
    @           0x5df8b1  clang::tidy::clangTidyMain()</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>