http://llvm.org/bugs/show_bug.cgi?id=20717
Bug ID: 20717
Summary: assertion failure assigning to immutable generic
lambda init-capture
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++1y
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
This testcase:
auto x = [i = 0](auto n) { return i += n; }(1);
... causes clang to assert in C++14 mode:
clang-3.5: include/llvm/Support/Casting.h:95: static bool
llvm::isa_impl_cl<clang::Decl, const clang::DeclCo
ntext *>::doit(const From *) [To = clang::Decl, From = const clang::DeclContext
*]: Assertion `Val && "isa<> used on a null pointer"' failed.
The bad cast<...> call on a null pointer is here:
#9 0x000000000260cdc5 in clang::DeclContext::getParent (this=0x0)
at tools/clang/include/clang/AST/DeclBase.h:1090
#10 0x0000000003866b0f in isReferenceToNonConstCapture (S=..., E=0x5c97798)
at tools/clang/lib/Sema/SemaExpr.cpp:8487
#11 0x00000000037bc06a in CheckForModifiableLvalue (E=0x5c97798, Loc=...,
S=...)
at tools/clang/lib/Sema/SemaExpr.cpp:8515
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs