[llvm-bugs] [Bug 37769] New: Assertion failure in CFGBuilder::findConstructionContexts

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 11 09:25:34 PDT 2018


            Bug ID: 37769
           Summary: Assertion failure in
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: noqnoqneo at gmail.com
          Reporter: alexfh at google.com
                CC: llvm-bugs at lists.llvm.org

$ cat ./test-CFGBuilder__findConstructionContexts.cc
class a {
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() ||
    @     0x55e2fb272596  __assert_fail
    @     0x55e2f9be9b63  (anonymous
    @     0x55e2f9bdcf62  (anonymous namespace)::CFGBuilder::Visit()
    @     0x55e2f9be4724  (anonymous namespace)::CFGBuilder::VisitChildren()
    @     0x55e2f9bec55e  (anonymous namespace)::CFGBuilder::VisitDeclSubExpr()
    @     0x55e2f9bded97  (anonymous
    @     0x55e2f9bd7d98  clang::CFG::buildCFG()
    @     0x55e2f9bcb45b  clang::AnalysisDeclContext::getCFG()
    @     0x55e2f8d0b97e  (anonymous namespace)::AnalysisConsumer::HandleCode()

Seems to have been introduced in https://reviews.llvm.org/rL330382.

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/20180611/ac58ccba/attachment.html>

More information about the llvm-bugs mailing list