https://bugs.llvm.org/show_bug.cgi?id=47636
Bug ID: 47636
Summary: R-value Reference list init causes segfault in
CodeGen::tryEmitPrivate
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: erich.ke...@intel.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk
The reproducer is just:
int(&&intu_rvref)[]{1,2,3,4};
The handling of tryEmitPrivate assumes that if there are elements in the
initializer, that it is a ConstantArrayType (CAT is not nullptr here:
https://github.com/llvm/llvm-project/blob/master/clang/lib/CodeGen/CGExprConstant.cpp#L2134).
The result is a seg-fault.
Presumably, I could change the getAsConstantArrayType to just getAsArrayType
(and update the test on 2147 to check for ConstantArrayType instead), but I was
unsure if the problem is that the AST itself is being formed incorrectly.
Does anyone have a suggestion?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs