[llvm-bugs] [Bug 37290] New: ICE on recursive trailing return type for variadic lambda
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Apr 30 00:11:47 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37290
Bug ID: 37290
Summary: ICE on recursive trailing return type for variadic
lambda
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: llvmbugbjorn at fahller.se
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
The attached program compiles on clang++-6, but ICEs on clang++-7/trunk at
331161.
Compiler output:
bf at rahonavis /v/t/1> /opt/clang/bin/clang++ -std=c++17 -c tests.cpp -v
clang version 7.0.0 (trunk 331144) (llvm/trunk 331161)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/clang/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.2.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.2.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
"/opt/clang/bin/clang-7" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj
-mrelax-all -disable-free -disable-llvm-verifier -discard-value-names
-main-file-name tests.cpp -mrelocation-model static -mthread-model posix
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info
-debugger-tuning=gdb -v -coverage-notes-file /var/tmp/1/tests.gcno
-resource-dir /opt/clang/lib/clang/7.0.0 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/x86_64-linux-gnu/c++/7.2.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/x86_64-linux-gnu/c++/7.2.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/backward
-internal-isystem /usr/local/include -internal-isystem
/opt/clang/lib/clang/7.0.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -std=c++17 -fdeprecated-macro
-fdebug-compilation-dir /var/tmp/1 -ferror-limit 19 -fmessage-length 166
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o tests.o -x c++ tests.cpp
clang -cc1 version 7.0.0 based upon LLVM 7.0.0svn default target
x86_64-unknown-linux-gnu
ignoring nonexistent directory "/include"
ignoring duplicate directory
"/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/x86_64-linux-gnu/c++/7.2.0"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/x86_64-linux-gnu/c++/7.2.0
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/backward
/usr/local/include
/opt/clang/lib/clang/7.0.0/include
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
Stack dump:
0. Program arguments: /opt/clang/bin/clang-7 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name tests.cpp
-mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -v
-coverage-notes-file /var/tmp/1/tests.gcno -resource-dir
/opt/clang/lib/clang/7.0.0 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/x86_64-linux-gnu/c++/7.2.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/x86_64-linux-gnu/c++/7.2.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/backward
-internal-isystem /usr/local/include -internal-isystem
/opt/clang/lib/clang/7.0.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -std=c++17 -fdeprecated-macro
-fdebug-compilation-dir /var/tmp/1 -ferror-limit 19 -fmessage-length 166
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o tests.o -x c++ tests.cpp
1. tests.cpp:80:64: current parser token ')'
2.
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/type_traits:2899:27:
instantiating variable definition 'std::is_invocable_r_v<bool, const (lambda at
tests.cpp:54:10), int, int>'
3.
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/type_traits:2854:12:
instantiating class definition 'std::is_invocable_r<bool, const (lambda at
tests.cpp:54:10), int, int>'
4.
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/type_traits:2447:12:
instantiating class definition 'std::__invoke_result<const (lambda at
tests.cpp:54:10), int, int>'
5.
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/type_traits:2409:12:
instantiating class definition 'std::__result_of_impl<false, false, const
(lambda at tests.cpp:54:10), int, int>'
6.
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/type_traits:2890:27:
instantiating variable definition 'std::is_invocable_v<(lambda at
tests.cpp:54:10), int &&>'
7.
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/type_traits:2848:12:
instantiating class definition 'std::is_invocable<(lambda at tests.cpp:54:10),
int &&>'
8.
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/type_traits:2447:12:
instantiating class definition 'std::__invoke_result<(lambda at
tests.cpp:54:10), int &&>'
9.
/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/type_traits:2409:12:
instantiating class definition 'std::__result_of_impl<false, false, (lambda at
tests.cpp:54:10), int &&>'
#0 0x000055df33ef673a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/opt/clang/bin/clang-7+0x206373a)
#1 0x000055df33ef4656 llvm::sys::RunSignalHandlers()
(/opt/clang/bin/clang-7+0x2061656)
#2 0x000055df33ef479c SignalHandler(int) (/opt/clang/bin/clang-7+0x206179c)
#3 0x00007f5457b11150 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x13150)
#4 0x000055df356865ca clang::Sema::tryCaptureVariable(clang::VarDecl*,
clang::SourceLocation, clang::Sema::TryCaptureKind, clang::SourceLocation,
bool, clang::QualType&, clang::QualType&, unsigned int const*)
(/opt/clang/bin/clang-7+0x37f35ca)
#5 0x000055df35688d41 clang::Sema::NeedToCaptureVariable(clang::VarDecl*,
clang::SourceLocation) (/opt/clang/bin/clang-7+0x37f5d41)
#6 0x000055df3568a770 clang::Sema::BuildDeclRefExpr(clang::ValueDecl*,
clang::QualType, clang::ExprValueKind, clang::DeclarationNameInfo const&,
clang::CXXScopeSpec const*, clang::NamedDecl*, clang::TemplateArgumentListInfo
const*) (/opt/clang/bin/clang-7+0x37f7770)
#7 0x000055df3568add7 clang::Sema::BuildDeclarationNameExpr(clang::CXXScopeSpec
const&, clang::DeclarationNameInfo const&, clang::NamedDecl*,
clang::NamedDecl*, clang::TemplateArgumentListInfo const*, bool)
(/opt/clang/bin/clang-7+0x37f7dd7)
#8 0x000055df3593b780 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDeclRefExpr(clang::DeclRefExpr*)
(/opt/clang/bin/clang-7+0x3aa8780)
#9 0x000055df35922aec clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/clang/bin/clang-7+0x3a8faec)
#10 0x000055df3592370b clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformInitializer(clang::Expr*, bool)
(/opt/clang/bin/clang-7+0x3a9070b)
#11 0x000055df35923990 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExprs(clang::Expr* const*, unsigned
int, bool, llvm::SmallVectorImpl<clang::Expr*>&, bool*)
(/opt/clang/bin/clang-7+0x3a90990)
#12 0x000055df3592821b clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*)
(/opt/clang/bin/clang-7+0x3a9521b)
#13 0x000055df35922cb0 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/clang/bin/clang-7+0x3a8fcb0)
#14 0x000055df3592a907 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a97907)
#15 0x000055df3593f1eb
clang::Sema::SubstFunctionDeclType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName, clang::CXXRecordDecl*, unsigned int)
(/opt/clang/bin/clang-7+0x3aac1eb)
#16 0x000055df35948163 clang::TemplateDeclInstantiator::VisitDecl(clang::Decl*)
(/opt/clang/bin/clang-7+0x3ab5163)
#17 0x000055df35959763
clang::TemplateDeclInstantiator::VisitCXXMethodDecl(clang::CXXMethodDecl*,
clang::TemplateParameterList*, bool) (/opt/clang/bin/clang-7+0x3ac6763)
#18 0x000055df35956aae clang::Sema::SubstDecl(clang::Decl*,
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&)
(/opt/clang/bin/clang-7+0x3ac3aae)
#19 0x000055df3590f0fb
clang::Sema::FinishTemplateArgumentDeduction(clang::FunctionTemplateDecl*,
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&,
llvm::SmallVectorImpl<clang::Sema::OriginalCallArg> const*, bool,
llvm::function_ref<bool ()>) (/opt/clang/bin/clang-7+0x3a7c0fb)
#20 0x000055df35914227
clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*,
clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&, bool,
llvm::function_ref<bool (llvm::ArrayRef<clang::QualType>)>)
(/opt/clang/bin/clang-7+0x3a81227)
#21 0x000055df3582427a
clang::Sema::AddMethodTemplateCandidate(clang::FunctionTemplateDecl*,
clang::DeclAccessPair, clang::CXXRecordDecl*, clang::TemplateArgumentListInfo*,
clang::QualType, clang::Expr::Classification, llvm::ArrayRef<clang::Expr*>,
clang::OverloadCandidateSet&, bool, bool) (/opt/clang/bin/clang-7+0x399127a)
#22 0x000055df35824741 clang::Sema::AddMethodCandidate(clang::DeclAccessPair,
clang::QualType, clang::Expr::Classification, llvm::ArrayRef<clang::Expr*>,
clang::OverloadCandidateSet&, bool) (/opt/clang/bin/clang-7+0x3991741)
#23 0x000055df35836f88 clang::Sema::BuildCallToObjectOfClassType(clang::Scope*,
clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation) (/opt/clang/bin/clang-7+0x39a3f88)
#24 0x000055df35693f28 clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool) (/opt/clang/bin/clang-7+0x3800f28)
#25 0x000055df35928273 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*)
(/opt/clang/bin/clang-7+0x3a95273)
#26 0x000055df35922cb0 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/clang/bin/clang-7+0x3a8fcb0)
#27 0x000055df3592a907 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a97907)
#28 0x000055df3592dcf1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*)
(/opt/clang/bin/clang-7+0x3a9acf1)
#29 0x000055df35932c1b clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument(clang::TemplateArgumentLoc
const&, clang::TemplateArgumentLoc&, bool) (/opt/clang/bin/clang-7+0x3a9fc1b)
#30 0x000055df35936368 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateSpecializationType(clang::TypeLocBuilder&,
clang::TemplateSpecializationTypeLoc, clang::TemplateName)
(/opt/clang/bin/clang-7+0x3aa3368)
#31 0x000055df3592a4a1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a974a1)
#32 0x000055df3593eeb1
clang::Sema::SubstFunctionDeclType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName, clang::CXXRecordDecl*, unsigned int)
(/opt/clang/bin/clang-7+0x3aabeb1)
#33 0x000055df35948163 clang::TemplateDeclInstantiator::VisitDecl(clang::Decl*)
(/opt/clang/bin/clang-7+0x3ab5163)
#34 0x000055df35959763
clang::TemplateDeclInstantiator::VisitCXXMethodDecl(clang::CXXMethodDecl*,
clang::TemplateParameterList*, bool) (/opt/clang/bin/clang-7+0x3ac6763)
#35 0x000055df35956aae clang::Sema::SubstDecl(clang::Decl*,
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&)
(/opt/clang/bin/clang-7+0x3ac3aae)
#36 0x000055df3590f0fb
clang::Sema::FinishTemplateArgumentDeduction(clang::FunctionTemplateDecl*,
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&,
llvm::SmallVectorImpl<clang::Sema::OriginalCallArg> const*, bool,
llvm::function_ref<bool ()>) (/opt/clang/bin/clang-7+0x3a7c0fb)
#37 0x000055df35914227
clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*,
clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&, bool,
llvm::function_ref<bool (llvm::ArrayRef<clang::QualType>)>)
(/opt/clang/bin/clang-7+0x3a81227)
#38 0x000055df35825887
clang::Sema::AddTemplateOverloadCandidate(clang::FunctionTemplateDecl*,
clang::DeclAccessPair, clang::TemplateArgumentListInfo*,
llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool, bool)
(/opt/clang/bin/clang-7+0x3992887)
#39 0x000055df35827a12
clang::Sema::AddOverloadedCallCandidates(clang::UnresolvedLookupExpr*,
llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool)
(/opt/clang/bin/clang-7+0x3994a12)
#40 0x000055df35827cc3 clang::Sema::buildOverloadedCallSet(clang::Scope*,
clang::Expr*, clang::UnresolvedLookupExpr*,
llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation,
clang::OverloadCandidateSet*, clang::ActionResult<clang::Expr*, true>*)
(/opt/clang/bin/clang-7+0x3994cc3)
#41 0x000055df3582ba6a clang::Sema::BuildOverloadedCallExpr(clang::Scope*,
clang::Expr*, clang::UnresolvedLookupExpr*, clang::SourceLocation,
llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*, bool,
bool) (/opt/clang/bin/clang-7+0x3998a6a)
#42 0x000055df35693bc8 clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool) (/opt/clang/bin/clang-7+0x3800bc8)
#43 0x000055df35928273 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*)
(/opt/clang/bin/clang-7+0x3a95273)
#44 0x000055df35922cb0 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/clang/bin/clang-7+0x3a8fcb0)
#45 0x000055df3592a907 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a97907)
#46 0x000055df3592dcf1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*)
(/opt/clang/bin/clang-7+0x3a9acf1)
#47 0x000055df359370ff clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName, bool) (/opt/clang/bin/clang-7+0x3aa40ff)
#48 0x000055df35951c33
clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(clang::TypedefNameDecl*,
bool) (/opt/clang/bin/clang-7+0x3abec33)
#49 0x000055df359521af
clang::TemplateDeclInstantiator::VisitTypedefDecl(clang::TypedefDecl*)
(/opt/clang/bin/clang-7+0x3abf1af)
#50 0x000055df359383ff clang::Sema::InstantiateClass(clang::SourceLocation,
clang::CXXRecordDecl*, clang::CXXRecordDecl*,
clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) (/opt/clang/bin/clang-7+0x3aa53ff)
#51 0x000055df35945842
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) (/opt/clang/bin/clang-7+0x3ab2842)
#52 0x000055df35985c45
clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser*) (/opt/clang/bin/clang-7+0x3af2c45)
#53 0x000055df35985f45 clang::Sema::RequireCompleteType(clang::SourceLocation,
clang::QualType, clang::Sema::TypeDiagnoser&)
(/opt/clang/bin/clang-7+0x3af2f45)
#54 0x000055df354614a0
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) (/opt/clang/bin/clang-7+0x35ce4a0)
#55 0x000055df35892098
clang::Sema::CheckTypenameType(clang::ElaboratedTypeKeyword,
clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::IdentifierInfo
const&, clang::SourceLocation) (/opt/clang/bin/clang-7+0x39ff098)
#56 0x000055df3591ad68 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::RebuildDependentNameType(clang::ElaboratedTypeKeyword,
clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::IdentifierInfo
const*, clang::SourceLocation, bool) (/opt/clang/bin/clang-7+0x3a87d68)
#57 0x000055df35936cf5 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentNameType(clang::TypeLocBuilder&,
clang::DependentNameTypeLoc, bool) (/opt/clang/bin/clang-7+0x3aa3cf5)
#58 0x000055df3592a84c clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a9784c)
#59 0x000055df3592dcf1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*)
(/opt/clang/bin/clang-7+0x3a9acf1)
#60 0x000055df359370ff clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName, bool) (/opt/clang/bin/clang-7+0x3aa40ff)
#61 0x000055df35937436 clang::Sema::SubstBaseSpecifiers(clang::CXXRecordDecl*,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&)
(/opt/clang/bin/clang-7+0x3aa4436)
#62 0x000055df35938284 clang::Sema::InstantiateClass(clang::SourceLocation,
clang::CXXRecordDecl*, clang::CXXRecordDecl*,
clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) (/opt/clang/bin/clang-7+0x3aa5284)
#63 0x000055df35945842
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) (/opt/clang/bin/clang-7+0x3ab2842)
#64 0x000055df35985c45
clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser*) (/opt/clang/bin/clang-7+0x3af2c45)
#65 0x000055df35985f45 clang::Sema::RequireCompleteType(clang::SourceLocation,
clang::QualType, clang::Sema::TypeDiagnoser&)
(/opt/clang/bin/clang-7+0x3af2f45)
#66 0x000055df354614a0
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) (/opt/clang/bin/clang-7+0x35ce4a0)
#67 0x000055df35892098
clang::Sema::CheckTypenameType(clang::ElaboratedTypeKeyword,
clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::IdentifierInfo
const&, clang::SourceLocation) (/opt/clang/bin/clang-7+0x39ff098)
#68 0x000055df3591ad68 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::RebuildDependentNameType(clang::ElaboratedTypeKeyword,
clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::IdentifierInfo
const*, clang::SourceLocation, bool) (/opt/clang/bin/clang-7+0x3a87d68)
#69 0x000055df35936cf5 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentNameType(clang::TypeLocBuilder&,
clang::DependentNameTypeLoc, bool) (/opt/clang/bin/clang-7+0x3aa3cf5)
#70 0x000055df3592a84c clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a9784c)
#71 0x000055df3592dcf1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*)
(/opt/clang/bin/clang-7+0x3a9acf1)
#72 0x000055df35932c1b clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument(clang::TemplateArgumentLoc
const&, clang::TemplateArgumentLoc&, bool) (/opt/clang/bin/clang-7+0x3a9fc1b)
#73 0x000055df35936368 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateSpecializationType(clang::TypeLocBuilder&,
clang::TemplateSpecializationTypeLoc, clang::TemplateName)
(/opt/clang/bin/clang-7+0x3aa3368)
#74 0x000055df3592a4a1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a974a1)
#75 0x000055df3592dcf1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*)
(/opt/clang/bin/clang-7+0x3a9acf1)
#76 0x000055df35932c1b clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument(clang::TemplateArgumentLoc
const&, clang::TemplateArgumentLoc&, bool) (/opt/clang/bin/clang-7+0x3a9fc1b)
#77 0x000055df35934578 bool clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArguments<clang::TemplateArgumentLoc
const*>(clang::TemplateArgumentLoc const*, clang::TemplateArgumentLoc const*,
clang::TemplateArgumentListInfo&, bool) (.constprop.2164)
(/opt/clang/bin/clang-7+0x3aa1578)
#78 0x000055df35934c6e clang::Sema::Subst(clang::TemplateArgumentLoc const*,
unsigned int, clang::TemplateArgumentListInfo&,
clang::MultiLevelTemplateArgumentList const&)
(/opt/clang/bin/clang-7+0x3aa1c6e)
#79 0x000055df358e4a19
_Z31FinishTemplateArgumentDeductionIN5clang38ClassTemplatePartialSpecializationDeclEENSt9enable_ifIXsr23IsPartialSpecializationIT_E5valueENS0_4Sema23TemplateDeductionResultEE4typeERS6_PS4_bRKNS0_20TemplateArgumentListERN4llvm15SmallVectorImplINS0_23DeducedTemplateArgumentEEERNS0_4sema21TemplateDeductionInfoE
(/opt/clang/bin/clang-7+0x3a51a19)
#80 0x000055df358ec8a6
clang::Sema::DeduceTemplateArguments(clang::ClassTemplatePartialSpecializationDecl*,
clang::TemplateArgumentList const&, clang::sema::TemplateDeductionInfo&)
(/opt/clang/bin/clang-7+0x3a598a6)
#81 0x000055df3591cb8b getPatternForClassTemplateSpecialization(clang::Sema&,
clang::SourceLocation, clang::ClassTemplateSpecializationDecl*,
clang::TemplateSpecializationKind, bool) (.constprop.2161)
(/opt/clang/bin/clang-7+0x3a89b8b)
#82 0x000055df359457f3
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) (/opt/clang/bin/clang-7+0x3ab27f3)
#83 0x000055df35985c45
clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser*) (/opt/clang/bin/clang-7+0x3af2c45)
#84 0x000055df35985f45 clang::Sema::RequireCompleteType(clang::SourceLocation,
clang::QualType, clang::Sema::TypeDiagnoser&)
(/opt/clang/bin/clang-7+0x3af2f45)
#85 0x000055df354614a0
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) (/opt/clang/bin/clang-7+0x35ce4a0)
#86 0x000055df35892098
clang::Sema::CheckTypenameType(clang::ElaboratedTypeKeyword,
clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::IdentifierInfo
const&, clang::SourceLocation) (/opt/clang/bin/clang-7+0x39ff098)
#87 0x000055df3591ad68 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::RebuildDependentNameType(clang::ElaboratedTypeKeyword,
clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::IdentifierInfo
const*, clang::SourceLocation, bool) (/opt/clang/bin/clang-7+0x3a87d68)
#88 0x000055df35936cf5 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentNameType(clang::TypeLocBuilder&,
clang::DependentNameTypeLoc, bool) (/opt/clang/bin/clang-7+0x3aa3cf5)
#89 0x000055df3592a84c clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a9784c)
#90 0x000055df3592dcf1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*)
(/opt/clang/bin/clang-7+0x3a9acf1)
#91 0x000055df359370ff clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName, bool) (/opt/clang/bin/clang-7+0x3aa40ff)
#92 0x000055df35937436 clang::Sema::SubstBaseSpecifiers(clang::CXXRecordDecl*,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&)
(/opt/clang/bin/clang-7+0x3aa4436)
#93 0x000055df35938284 clang::Sema::InstantiateClass(clang::SourceLocation,
clang::CXXRecordDecl*, clang::CXXRecordDecl*,
clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) (/opt/clang/bin/clang-7+0x3aa5284)
#94 0x000055df35945842
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) (/opt/clang/bin/clang-7+0x3ab2842)
#95 0x000055df35985c45
clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser*) (/opt/clang/bin/clang-7+0x3af2c45)
#96 0x000055df35985f45 clang::Sema::RequireCompleteType(clang::SourceLocation,
clang::QualType, clang::Sema::TypeDiagnoser&)
(/opt/clang/bin/clang-7+0x3af2f45)
#97 0x000055df354614a0
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) (/opt/clang/bin/clang-7+0x35ce4a0)
#98 0x000055df3568b4c9
clang::Sema::BuildQualifiedDeclarationNameExpr(clang::CXXScopeSpec&,
clang::DeclarationNameInfo const&, bool, clang::Scope const*,
clang::TypeSourceInfo**) (/opt/clang/bin/clang-7+0x37f84c9)
#99 0x000055df3593abba clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentScopeDeclRefExpr(clang::DependentScopeDeclRefExpr*,
bool, clang::TypeSourceInfo**) (/opt/clang/bin/clang-7+0x3aa7bba)
#100 0x000055df35922ab5 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/clang/bin/clang-7+0x3a8fab5)
#101 0x000055df3592370b clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformInitializer(clang::Expr*, bool)
(/opt/clang/bin/clang-7+0x3a9070b)
#102 0x000055df35924af4 clang::Sema::SubstInitializer(clang::Expr*,
clang::MultiLevelTemplateArgumentList const&, bool)
(/opt/clang/bin/clang-7+0x3a91af4)
#103 0x000055df35948b3c
clang::Sema::InstantiateVariableInitializer(clang::VarDecl*, clang::VarDecl*,
clang::MultiLevelTemplateArgumentList const&)
(/opt/clang/bin/clang-7+0x3ab5b3c)
#104 0x000055df35948deb
clang::Sema::CompleteVarTemplateSpecializationDecl(clang::VarTemplateSpecializationDecl*,
clang::VarDecl*, clang::MultiLevelTemplateArgumentList const&)
(/opt/clang/bin/clang-7+0x3ab5deb)
#105 0x000055df35957b0d
clang::Sema::InstantiateVariableDefinition(clang::SourceLocation,
clang::VarDecl*, bool, bool, bool) (/opt/clang/bin/clang-7+0x3ac4b0d)
#106 0x000055df35689cc6 DoMarkVarDeclReferenced(clang::Sema&,
clang::SourceLocation, clang::VarDecl*, clang::Expr*)
(/opt/clang/bin/clang-7+0x37f6cc6)
#107 0x000055df3568a287 clang::Sema::BuildDeclRefExpr(clang::ValueDecl*,
clang::QualType, clang::ExprValueKind, clang::DeclarationNameInfo const&,
clang::CXXScopeSpec const*, clang::NamedDecl*, clang::TemplateArgumentListInfo
const*) (/opt/clang/bin/clang-7+0x37f7287)
#108 0x000055df3568add7
clang::Sema::BuildDeclarationNameExpr(clang::CXXScopeSpec const&,
clang::DeclarationNameInfo const&, clang::NamedDecl*, clang::NamedDecl*,
clang::TemplateArgumentListInfo const*, bool)
(/opt/clang/bin/clang-7+0x37f7dd7)
#109 0x000055df3589b16c clang::Sema::CheckVarTemplateId(clang::CXXScopeSpec
const&, clang::DeclarationNameInfo const&, clang::VarTemplateDecl*,
clang::SourceLocation, clang::TemplateArgumentListInfo const*)
(/opt/clang/bin/clang-7+0x3a0816c)
#110 0x000055df3589b2b7 clang::Sema::BuildTemplateIdExpr(clang::CXXScopeSpec
const&, clang::SourceLocation, clang::LookupResult&, bool,
clang::TemplateArgumentListInfo const*) (/opt/clang/bin/clang-7+0x3a082b7)
#111 0x000055df3593be2b clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformUnresolvedLookupExpr(clang::UnresolvedLookupExpr*)
(/opt/clang/bin/clang-7+0x3aa8e2b)
#112 0x000055df359228a5 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/clang/bin/clang-7+0x3a8f8a5)
#113 0x000055df35927d6a clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCXXFoldExpr(clang::CXXFoldExpr*)
(/opt/clang/bin/clang-7+0x3a94d6a)
#114 0x000055df35922d35 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/clang/bin/clang-7+0x3a8fd35)
#115 0x000055df35932c75 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument(clang::TemplateArgumentLoc
const&, clang::TemplateArgumentLoc&, bool) (/opt/clang/bin/clang-7+0x3a9fc75)
#116 0x000055df35936368 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateSpecializationType(clang::TypeLocBuilder&,
clang::TemplateSpecializationTypeLoc, clang::TemplateName)
(/opt/clang/bin/clang-7+0x3aa3368)
#117 0x000055df3592a4a1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a974a1)
#118 0x000055df3593dd2e clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformElaboratedType(clang::TypeLocBuilder&,
clang::ElaboratedTypeLoc) (/opt/clang/bin/clang-7+0x3aaad2e)
#119 0x000055df3592a6d5 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a976d5)
#120 0x000055df3592dcf1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*)
(/opt/clang/bin/clang-7+0x3a9acf1)
#121 0x000055df35936e02 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTypeWithDeducedTST(clang::TypeSourceInfo*)
(/opt/clang/bin/clang-7+0x3aa3e02)
#122 0x000055df3593a36c clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCXXUnresolvedConstructExpr(clang::CXXUnresolvedConstructExpr*)
(/opt/clang/bin/clang-7+0x3aa736c)
#123 0x000055df35922cc4 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/clang/bin/clang-7+0x3a8fcc4)
#124 0x000055df3592370b clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformInitializer(clang::Expr*, bool)
(/opt/clang/bin/clang-7+0x3a9070b)
#125 0x000055df35923990 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExprs(clang::Expr* const*, unsigned
int, bool, llvm::SmallVectorImpl<clang::Expr*>&, bool*)
(/opt/clang/bin/clang-7+0x3a90990)
#126 0x000055df3592821b clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*)
(/opt/clang/bin/clang-7+0x3a9521b)
#127 0x000055df35922cb0 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/clang/bin/clang-7+0x3a8fcb0)
#128 0x000055df3592a907 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a97907)
#129 0x000055df3593f1eb
clang::Sema::SubstFunctionDeclType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName, clang::CXXRecordDecl*, unsigned int)
(/opt/clang/bin/clang-7+0x3aac1eb)
#130 0x000055df35948163
clang::TemplateDeclInstantiator::VisitDecl(clang::Decl*)
(/opt/clang/bin/clang-7+0x3ab5163)
#131 0x000055df35959763
clang::TemplateDeclInstantiator::VisitCXXMethodDecl(clang::CXXMethodDecl*,
clang::TemplateParameterList*, bool) (/opt/clang/bin/clang-7+0x3ac6763)
#132 0x000055df35956aae clang::Sema::SubstDecl(clang::Decl*,
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&)
(/opt/clang/bin/clang-7+0x3ac3aae)
#133 0x000055df3590f0fb
clang::Sema::FinishTemplateArgumentDeduction(clang::FunctionTemplateDecl*,
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&,
llvm::SmallVectorImpl<clang::Sema::OriginalCallArg> const*, bool,
llvm::function_ref<bool ()>) (/opt/clang/bin/clang-7+0x3a7c0fb)
#134 0x000055df35914227
clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*,
clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&, bool,
llvm::function_ref<bool (llvm::ArrayRef<clang::QualType>)>)
(/opt/clang/bin/clang-7+0x3a81227)
#135 0x000055df3582427a
clang::Sema::AddMethodTemplateCandidate(clang::FunctionTemplateDecl*,
clang::DeclAccessPair, clang::CXXRecordDecl*, clang::TemplateArgumentListInfo*,
clang::QualType, clang::Expr::Classification, llvm::ArrayRef<clang::Expr*>,
clang::OverloadCandidateSet&, bool, bool) (/opt/clang/bin/clang-7+0x399127a)
#136 0x000055df35824741 clang::Sema::AddMethodCandidate(clang::DeclAccessPair,
clang::QualType, clang::Expr::Classification, llvm::ArrayRef<clang::Expr*>,
clang::OverloadCandidateSet&, bool) (/opt/clang/bin/clang-7+0x3991741)
#137 0x000055df35836f88
clang::Sema::BuildCallToObjectOfClassType(clang::Scope*, clang::Expr*,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation) (/opt/clang/bin/clang-7+0x39a3f88)
#138 0x000055df35693f28 clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool) (/opt/clang/bin/clang-7+0x3800f28)
#139 0x000055df35928273 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*)
(/opt/clang/bin/clang-7+0x3a95273)
#140 0x000055df35922cb0 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/clang/bin/clang-7+0x3a8fcb0)
#141 0x000055df3592a907 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a97907)
#142 0x000055df3592dcf1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*)
(/opt/clang/bin/clang-7+0x3a9acf1)
#143 0x000055df35932c1b clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument(clang::TemplateArgumentLoc
const&, clang::TemplateArgumentLoc&, bool) (/opt/clang/bin/clang-7+0x3a9fc1b)
#144 0x000055df35936368 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateSpecializationType(clang::TypeLocBuilder&,
clang::TemplateSpecializationTypeLoc, clang::TemplateName)
(/opt/clang/bin/clang-7+0x3aa3368)
#145 0x000055df3592a4a1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a974a1)
#146 0x000055df3593eeb1
clang::Sema::SubstFunctionDeclType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName, clang::CXXRecordDecl*, unsigned int)
(/opt/clang/bin/clang-7+0x3aabeb1)
#147 0x000055df35948163
clang::TemplateDeclInstantiator::VisitDecl(clang::Decl*)
(/opt/clang/bin/clang-7+0x3ab5163)
#148 0x000055df35959763
clang::TemplateDeclInstantiator::VisitCXXMethodDecl(clang::CXXMethodDecl*,
clang::TemplateParameterList*, bool) (/opt/clang/bin/clang-7+0x3ac6763)
#149 0x000055df35956aae clang::Sema::SubstDecl(clang::Decl*,
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&)
(/opt/clang/bin/clang-7+0x3ac3aae)
#150 0x000055df3590f0fb
clang::Sema::FinishTemplateArgumentDeduction(clang::FunctionTemplateDecl*,
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&,
llvm::SmallVectorImpl<clang::Sema::OriginalCallArg> const*, bool,
llvm::function_ref<bool ()>) (/opt/clang/bin/clang-7+0x3a7c0fb)
#151 0x000055df35914227
clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*,
clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&, bool,
llvm::function_ref<bool (llvm::ArrayRef<clang::QualType>)>)
(/opt/clang/bin/clang-7+0x3a81227)
#152 0x000055df35825887
clang::Sema::AddTemplateOverloadCandidate(clang::FunctionTemplateDecl*,
clang::DeclAccessPair, clang::TemplateArgumentListInfo*,
llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool, bool)
(/opt/clang/bin/clang-7+0x3992887)
#153 0x000055df35827a12
clang::Sema::AddOverloadedCallCandidates(clang::UnresolvedLookupExpr*,
llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool)
(/opt/clang/bin/clang-7+0x3994a12)
#154 0x000055df35827cc3 clang::Sema::buildOverloadedCallSet(clang::Scope*,
clang::Expr*, clang::UnresolvedLookupExpr*,
llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation,
clang::OverloadCandidateSet*, clang::ActionResult<clang::Expr*, true>*)
(/opt/clang/bin/clang-7+0x3994cc3)
#155 0x000055df3582ba6a clang::Sema::BuildOverloadedCallExpr(clang::Scope*,
clang::Expr*, clang::UnresolvedLookupExpr*, clang::SourceLocation,
llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*, bool,
bool) (/opt/clang/bin/clang-7+0x3998a6a)
#156 0x000055df35693bc8 clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool) (/opt/clang/bin/clang-7+0x3800bc8)
#157 0x000055df35928273 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*)
(/opt/clang/bin/clang-7+0x3a95273)
#158 0x000055df35922cb0 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/clang/bin/clang-7+0x3a8fcb0)
#159 0x000055df3592a907 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a97907)
#160 0x000055df3592dcf1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*)
(/opt/clang/bin/clang-7+0x3a9acf1)
#161 0x000055df359370ff clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName, bool) (/opt/clang/bin/clang-7+0x3aa40ff)
#162 0x000055df35951c33
clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(clang::TypedefNameDecl*,
bool) (/opt/clang/bin/clang-7+0x3abec33)
#163 0x000055df359521af
clang::TemplateDeclInstantiator::VisitTypedefDecl(clang::TypedefDecl*)
(/opt/clang/bin/clang-7+0x3abf1af)
#164 0x000055df359383ff clang::Sema::InstantiateClass(clang::SourceLocation,
clang::CXXRecordDecl*, clang::CXXRecordDecl*,
clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) (/opt/clang/bin/clang-7+0x3aa53ff)
#165 0x000055df35945842
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) (/opt/clang/bin/clang-7+0x3ab2842)
#166 0x000055df35985c45
clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser*) (/opt/clang/bin/clang-7+0x3af2c45)
#167 0x000055df35985f45 clang::Sema::RequireCompleteType(clang::SourceLocation,
clang::QualType, clang::Sema::TypeDiagnoser&)
(/opt/clang/bin/clang-7+0x3af2f45)
#168 0x000055df354614a0
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) (/opt/clang/bin/clang-7+0x35ce4a0)
#169 0x000055df35892098
clang::Sema::CheckTypenameType(clang::ElaboratedTypeKeyword,
clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::IdentifierInfo
const&, clang::SourceLocation) (/opt/clang/bin/clang-7+0x39ff098)
#170 0x000055df3591ad68 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::RebuildDependentNameType(clang::ElaboratedTypeKeyword,
clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::IdentifierInfo
const*, clang::SourceLocation, bool) (/opt/clang/bin/clang-7+0x3a87d68)
#171 0x000055df35936cf5 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentNameType(clang::TypeLocBuilder&,
clang::DependentNameTypeLoc, bool) (/opt/clang/bin/clang-7+0x3aa3cf5)
#172 0x000055df3592a84c clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a9784c)
#173 0x000055df3592dcf1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*)
(/opt/clang/bin/clang-7+0x3a9acf1)
#174 0x000055df359370ff clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName, bool) (/opt/clang/bin/clang-7+0x3aa40ff)
#175 0x000055df35937436 clang::Sema::SubstBaseSpecifiers(clang::CXXRecordDecl*,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&)
(/opt/clang/bin/clang-7+0x3aa4436)
#176 0x000055df35938284 clang::Sema::InstantiateClass(clang::SourceLocation,
clang::CXXRecordDecl*, clang::CXXRecordDecl*,
clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) (/opt/clang/bin/clang-7+0x3aa5284)
#177 0x000055df35945842
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) (/opt/clang/bin/clang-7+0x3ab2842)
#178 0x000055df35985c45
clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser*) (/opt/clang/bin/clang-7+0x3af2c45)
#179 0x000055df35985f45 clang::Sema::RequireCompleteType(clang::SourceLocation,
clang::QualType, clang::Sema::TypeDiagnoser&)
(/opt/clang/bin/clang-7+0x3af2f45)
#180 0x000055df354614a0
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) (/opt/clang/bin/clang-7+0x35ce4a0)
#181 0x000055df35892098
clang::Sema::CheckTypenameType(clang::ElaboratedTypeKeyword,
clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::IdentifierInfo
const&, clang::SourceLocation) (/opt/clang/bin/clang-7+0x39ff098)
#182 0x000055df3591ad68 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::RebuildDependentNameType(clang::ElaboratedTypeKeyword,
clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::IdentifierInfo
const*, clang::SourceLocation, bool) (/opt/clang/bin/clang-7+0x3a87d68)
#183 0x000055df35936cf5 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentNameType(clang::TypeLocBuilder&,
clang::DependentNameTypeLoc, bool) (/opt/clang/bin/clang-7+0x3aa3cf5)
#184 0x000055df3592a84c clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a9784c)
#185 0x000055df3592dcf1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*)
(/opt/clang/bin/clang-7+0x3a9acf1)
#186 0x000055df35932c1b clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument(clang::TemplateArgumentLoc
const&, clang::TemplateArgumentLoc&, bool) (/opt/clang/bin/clang-7+0x3a9fc1b)
#187 0x000055df35936368 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateSpecializationType(clang::TypeLocBuilder&,
clang::TemplateSpecializationTypeLoc, clang::TemplateName)
(/opt/clang/bin/clang-7+0x3aa3368)
#188 0x000055df3592a4a1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a974a1)
#189 0x000055df3592dcf1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*)
(/opt/clang/bin/clang-7+0x3a9acf1)
#190 0x000055df35932c1b clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument(clang::TemplateArgumentLoc
const&, clang::TemplateArgumentLoc&, bool) (/opt/clang/bin/clang-7+0x3a9fc1b)
#191 0x000055df35934578 bool clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArguments<clang::TemplateArgumentLoc
const*>(clang::TemplateArgumentLoc const*, clang::TemplateArgumentLoc const*,
clang::TemplateArgumentListInfo&, bool) (.constprop.2164)
(/opt/clang/bin/clang-7+0x3aa1578)
#192 0x000055df35934c6e clang::Sema::Subst(clang::TemplateArgumentLoc const*,
unsigned int, clang::TemplateArgumentListInfo&,
clang::MultiLevelTemplateArgumentList const&)
(/opt/clang/bin/clang-7+0x3aa1c6e)
#193 0x000055df358e4a19
_Z31FinishTemplateArgumentDeductionIN5clang38ClassTemplatePartialSpecializationDeclEENSt9enable_ifIXsr23IsPartialSpecializationIT_E5valueENS0_4Sema23TemplateDeductionResultEE4typeERS6_PS4_bRKNS0_20TemplateArgumentListERN4llvm15SmallVectorImplINS0_23DeducedTemplateArgumentEEERNS0_4sema21TemplateDeductionInfoE
(/opt/clang/bin/clang-7+0x3a51a19)
#194 0x000055df358ec8a6
clang::Sema::DeduceTemplateArguments(clang::ClassTemplatePartialSpecializationDecl*,
clang::TemplateArgumentList const&, clang::sema::TemplateDeductionInfo&)
(/opt/clang/bin/clang-7+0x3a598a6)
#195 0x000055df3591cb8b getPatternForClassTemplateSpecialization(clang::Sema&,
clang::SourceLocation, clang::ClassTemplateSpecializationDecl*,
clang::TemplateSpecializationKind, bool) (.constprop.2161)
(/opt/clang/bin/clang-7+0x3a89b8b)
#196 0x000055df359457f3
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) (/opt/clang/bin/clang-7+0x3ab27f3)
#197 0x000055df35985c45
clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser*) (/opt/clang/bin/clang-7+0x3af2c45)
#198 0x000055df35985f45 clang::Sema::RequireCompleteType(clang::SourceLocation,
clang::QualType, clang::Sema::TypeDiagnoser&)
(/opt/clang/bin/clang-7+0x3af2f45)
#199 0x000055df354614a0
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) (/opt/clang/bin/clang-7+0x35ce4a0)
#200 0x000055df35892098
clang::Sema::CheckTypenameType(clang::ElaboratedTypeKeyword,
clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::IdentifierInfo
const&, clang::SourceLocation) (/opt/clang/bin/clang-7+0x39ff098)
#201 0x000055df3591ad68 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::RebuildDependentNameType(clang::ElaboratedTypeKeyword,
clang::SourceLocation, clang::NestedNameSpecifierLoc, clang::IdentifierInfo
const*, clang::SourceLocation, bool) (/opt/clang/bin/clang-7+0x3a87d68)
#202 0x000055df35936cf5 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentNameType(clang::TypeLocBuilder&,
clang::DependentNameTypeLoc, bool) (/opt/clang/bin/clang-7+0x3aa3cf5)
#203 0x000055df3592a84c clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/clang/bin/clang-7+0x3a9784c)
#204 0x000055df3592dcf1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*)
(/opt/clang/bin/clang-7+0x3a9acf1)
#205 0x000055df359370ff clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName, bool) (/opt/clang/bin/clang-7+0x3aa40ff)
#206 0x000055df35937436 clang::Sema::SubstBaseSpecifiers(clang::CXXRecordDecl*,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&)
(/opt/clang/bin/clang-7+0x3aa4436)
#207 0x000055df35938284 clang::Sema::InstantiateClass(clang::SourceLocation,
clang::CXXRecordDecl*, clang::CXXRecordDecl*,
clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) (/opt/clang/bin/clang-7+0x3aa5284)
#208 0x000055df35945842
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) (/opt/clang/bin/clang-7+0x3ab2842)
#209 0x000055df35985c45
clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser*) (/opt/clang/bin/clang-7+0x3af2c45)
#210 0x000055df35985f45 clang::Sema::RequireCompleteType(clang::SourceLocation,
clang::QualType, clang::Sema::TypeDiagnoser&)
(/opt/clang/bin/clang-7+0x3af2f45)
#211 0x000055df354614a0
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) (/opt/clang/bin/clang-7+0x35ce4a0)
#212 0x000055df3568b4c9
clang::Sema::BuildQualifiedDeclarationNameExpr(clang::CXXScopeSpec&,
clang::DeclarationNameInfo const&, bool, clang::Scope const*,
clang::TypeSourceInfo**) (/opt/clang/bin/clang-7+0x37f84c9)
#213 0x000055df3593abba clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentScopeDeclRefExpr(clang::DependentScopeDeclRefExpr*,
bool, clang::TypeSourceInfo**) (/opt/clang/bin/clang-7+0x3aa7bba)
#214 0x000055df35922ab5 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/clang/bin/clang-7+0x3a8fab5)
#215 0x000055df3592370b clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformInitializer(clang::Expr*, bool)
(/opt/clang/bin/clang-7+0x3a9070b)
#216 0x000055df35924af4 clang::Sema::SubstInitializer(clang::Expr*,
clang::MultiLevelTemplateArgumentList const&, bool)
(/opt/clang/bin/clang-7+0x3a91af4)
#217 0x000055df35948b3c
clang::Sema::InstantiateVariableInitializer(clang::VarDecl*, clang::VarDecl*,
clang::MultiLevelTemplateArgumentList const&)
(/opt/clang/bin/clang-7+0x3ab5b3c)
#218 0x000055df35948deb
clang::Sema::CompleteVarTemplateSpecializationDecl(clang::VarTemplateSpecializationDecl*,
clang::VarDecl*, clang::MultiLevelTemplateArgumentList const&)
(/opt/clang/bin/clang-7+0x3ab5deb)
#219 0x000055df35957b0d
clang::Sema::InstantiateVariableDefinition(clang::SourceLocation,
clang::VarDecl*, bool, bool, bool) (/opt/clang/bin/clang-7+0x3ac4b0d)
#220 0x000055df35689cc6 DoMarkVarDeclReferenced(clang::Sema&,
clang::SourceLocation, clang::VarDecl*, clang::Expr*)
(/opt/clang/bin/clang-7+0x37f6cc6)
#221 0x000055df3568a287 clang::Sema::BuildDeclRefExpr(clang::ValueDecl*,
clang::QualType, clang::ExprValueKind, clang::DeclarationNameInfo const&,
clang::CXXScopeSpec const*, clang::NamedDecl*, clang::TemplateArgumentListInfo
const*) (/opt/clang/bin/clang-7+0x37f7287)
#222 0x000055df3568add7
clang::Sema::BuildDeclarationNameExpr(clang::CXXScopeSpec const&,
clang::DeclarationNameInfo const&, clang::NamedDecl*, clang::NamedDecl*,
clang::TemplateArgumentListInfo const*, bool)
(/opt/clang/bin/clang-7+0x37f7dd7)
#223 0x000055df3589b16c clang::Sema::CheckVarTemplateId(clang::CXXScopeSpec
const&, clang::DeclarationNameInfo const&, clang::VarTemplateDecl*,
clang::SourceLocation, clang::TemplateArgumentListInfo const*)
(/opt/clang/bin/clang-7+0x3a0816c)
#224 0x000055df3589b2b7 clang::Sema::BuildTemplateIdExpr(clang::CXXScopeSpec
const&, clang::SourceLocation, clang::LookupResult&, bool,
clang::TemplateArgumentListInfo const*) (/opt/clang/bin/clang-7+0x3a082b7)
#225 0x000055df3568c0e5 clang::Sema::ActOnIdExpression(clang::Scope*,
clang::CXXScopeSpec&, clang::SourceLocation, clang::UnqualifiedId&, bool, bool,
std::unique_ptr<clang::CorrectionCandidateCallback,
std::default_delete<clang::CorrectionCandidateCallback> >, bool, clang::Token*)
(/opt/clang/bin/clang-7+0x37f90e5)
#226 0x000055df35275a06
clang::Parser::tryParseCXXIdExpression(clang::CXXScopeSpec&, bool,
clang::Token&) (/opt/clang/bin/clang-7+0x33e2a06)
#227 0x000055df35275aee clang::Parser::ParseCXXIdExpression(bool)
(/opt/clang/bin/clang-7+0x33e2aee)
#228 0x000055df3525ed27 clang::Parser::ParseCastExpression(bool, bool, bool&,
clang::Parser::TypeCastState, bool) (/opt/clang/bin/clang-7+0x33cbd27)
#229 0x000055df35260b74 clang::Parser::ParseCastExpression(bool, bool,
clang::Parser::TypeCastState, bool) (/opt/clang/bin/clang-7+0x33cdb74)
#230 0x000055df3525e7c9 clang::Parser::ParseCastExpression(bool, bool, bool&,
clang::Parser::TypeCastState, bool) (/opt/clang/bin/clang-7+0x33cb7c9)
#231 0x000055df35260b74 clang::Parser::ParseCastExpression(bool, bool,
clang::Parser::TypeCastState, bool) (/opt/clang/bin/clang-7+0x33cdb74)
#232 0x000055df35265692
clang::Parser::ParseConstantExpressionInExprEvalContext(clang::Parser::TypeCastState)
(/opt/clang/bin/clang-7+0x33d2692)
#233 0x000055df3524adf9
clang::Parser::ParseStaticAssertDeclaration(clang::SourceLocation&)
(/opt/clang/bin/clang-7+0x33b7df9)
#234 0x000055df35242c9f
clang::Parser::ParseDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&)
(/opt/clang/bin/clang-7+0x33afc9f)
#235 0x000055df35220468
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) (/opt/clang/bin/clang-7+0x338d468)
#236 0x000055df352212e9
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(/opt/clang/bin/clang-7+0x338e2e9)
#237 0x000055df35215cf6 clang::ParseAST(clang::Sema&, bool, bool)
(/opt/clang/bin/clang-7+0x3382cf6)
#238 0x000055df3488ae27 clang::CodeGenAction::ExecuteAction()
(/opt/clang/bin/clang-7+0x29f7e27)
#239 0x000055df34539006 clang::FrontendAction::Execute()
(/opt/clang/bin/clang-7+0x26a6006)
#240 0x000055df344ff26c
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/opt/clang/bin/clang-7+0x266c26c)
#241 0x000055df345ef6e3
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/opt/clang/bin/clang-7+0x275c6e3)
#242 0x000055df3281b898 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/opt/clang/bin/clang-7+0x988898)
#243 0x000055df3278e643 main (/opt/clang/bin/clang-7+0x8fb643)
#244 0x00007f54568021c1 __libc_start_main
/build/glibc-itYbWN/glibc-2.26/csu/../csu/libc-start.c:342:0
#245 0x000055df32818bea _start (/opt/clang/bin/clang-7+0x985bea)
clang-7: error: unable to execute command: Segmentation fault (core dumped)
clang-7: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 7.0.0 (trunk 331144) (llvm/trunk 331161)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/clang/bin
clang-7: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang-7: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-7: note: diagnostic msg: /tmp/tests-d1dfc6.cpp
clang-7: note: diagnostic msg: /tmp/tests-d1dfc6.sh
clang-7: note: diagnostic msg:
********************
tests.cpp:
#include <utility>
#include <tuple>
#define LIFT_THRICE(...) \
noexcept(noexcept(__VA_ARGS__)) \
-> decltype(__VA_ARGS__) \
{ \
return __VA_ARGS__; \
}
#define LIFT_FWD(x) std::forward<decltype(x)>(x)
namespace lift {
template <typename F>
inline
constexpr
auto
compose(
F&& f
)
noexcept
-> F
{
return std::forward<F>(f);
}
namespace detail {
template <typename P, typename F, typename Tail, typename ... T>
inline
constexpr
auto
compose(
P,
F&& f,
Tail&& tail,
T&& ... objs)
-> decltype(f(tail(std::forward<T>(objs)...)))
{
return f(tail(std::forward<T>(objs)...));
}
}
template <typename F, typename ... Fs>
inline
constexpr
auto
compose(
F&& f,
Fs&&... fs)
{
return [f = std::forward<F>(f), tail = compose(std::forward<Fs>(fs)...)]
(auto&& ... objs)
->
decltype(detail::compose(std::bool_constant<(std::is_invocable_v<decltype(compose(std::forward<Fs>(fs)...)),
decltype(objs)> && ...)>{},
f,
compose(std::forward<Fs>(fs)...),
LIFT_FWD(objs)...))
{
};
}
template <typename T>
inline
constexpr
auto
greater_than(
T&& t)
{
return [t = std::forward<T>(t)](const auto& obj) LIFT_THRICE(obj > t);
}
}
template <auto N>
constexpr auto gt = lift::greater_than(N);
auto constexpr sumgt2 = lift::compose(gt<2>, std::negate<>{}, std::plus<>{});
using sumgt2type = decltype(sumgt2);
static_assert(std::is_invocable_r_v<bool, sumgt2type, int, int>);
--
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/20180430/7c8e4503/attachment-0001.html>
More information about the llvm-bugs
mailing list