[llvm-bugs] [Bug 37152] New: Assertion failure in clang::ento::ExprEngine::VisitCXXDestructor() "Only CXXRecordDecls should have destructors"

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 17 07:35:37 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37152

            Bug ID: 37152
           Summary: Assertion failure in
                    clang::ento::ExprEngine::VisitCXXDestructor() "Only
                    CXXRecordDecls should have destructors"
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: dcoughlin at apple.com
          Reporter: alexfh at google.com
                CC: llvm-bugs at lists.llvm.org

$ cat test-clang__ento__ExprEngine__VisitCXXDestructor.cc
class a {
 protected:
  ~a();
};
class : a {
} typedef b[8];
class c {
  b d;
  bool m_fn1();
};
bool c::m_fn1() { delete &d; }
$ ./clang-tidy -checks=-*,clang-analyzer*
test-clang__ento__ExprEngine__VisitCXXDestructor.cc -- -std=c++11
assertion failed at lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:464 in void
clang::ento::ExprEngine::VisitCXXDestructor(clang::QualType, const
clang::ento::MemRegion *, const clang::Stmt *, bool, clang::ento::ExplodedNode
*, clang::ento::ExplodedNodeSet &, const
clang::ento::ExprEngine::EvalCallOptions &): RecordDecl &&
"Only CXXRecordDecls should have destructors"
    @     0x55669190ba26  __assert_fail
    @     0x55668f6dbd18  clang::ento::ExprEngine::VisitCXXDestructor()
    @     0x55668f6ae948  clang::ento::ExprEngine::ProcessDeleteDtor()
    @     0x55668f6a9644  clang::ento::ExprEngine::ProcessImplicitDtor()
    @     0x55668f6a82f6  clang::ento::ExprEngine::processCFGElement()
    @     0x55668f6cd795  clang::ento::CoreEngine::HandlePostStmt()
    @     0x55668f6cca4d  clang::ento::CoreEngine::ExecuteWorkList()
    @     0x55668f3fa7fc  (anonymous
namespace)::AnalysisConsumer::ActionExprEngine()
    @     0x55668f3fa376  (anonymous namespace)::AnalysisConsumer::HandleCode()
    @     0x55668f3e60e4  (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit()

-- 
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/20180417/bd51925e/attachment.html>


More information about the llvm-bugs mailing list