https://bugs.llvm.org/show_bug.cgi?id=37769
Bug ID: 37769
Summary: Assertion failure in
CFGBuilder::findConstructionContexts
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: noqnoq...@gmail.com
Reporter: ale...@google.com
CC: llvm-bugs@lists.llvm.org
$ 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 https://reviews.llvm.org/rL330382.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs