[cfe-dev] Assertion failure when mangling complex decltype

Ding Fei via cfe-dev cfe-dev at lists.llvm.org
Thu Jan 24 03:22:10 PST 2019


Hi all,

On release_70, for the example code:

*#include <type_traits>*
*class Node {};*

*template<typename GetBeginT>*
*void buildGenericSCCs(GetBeginT &&GetBegin) {*
*  decltype(GetBegin(std::declval<Node &>())) DFSStack;*
*}*

In Mangle.h when calling mangleCXXName() on VarDecl of DFSStack, assertion
triggered:

*tools/clang/lib/AST/ItaniumMangle.cpp:4317: void (anonymous
namespace)::CXXNameMangler::mangleFunctionParam(const clang::ParmVarDecl
*): Assertion `parmDepth < FunctionTypeDepth.getDepth()' failed.*

Do anyone have any ideas on the cause of it? Thanks
--
Best Regards

Ding Fei
E-mail: danix800 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190124/65799472/attachment.html>


More information about the cfe-dev mailing list