<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - clang crashes when compiling generic lambda with template parameter"
href="https://llvm.org/bugs/show_bug.cgi?id=27015">27015</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang crashes when compiling generic lambda with template parameter
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++14
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ahatanak@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>template <class> auto fn = [] {};
template <typename> void fn1() { fn<char>; }
$ clang -std=c++14 -c test.cpp
Assertion failed: (!Init->isValueDependent()), function evaluateValue, file
llvm/tools/clang/lib/AST/Decl.cpp, line 2164.
0 clang-3.9 0x0000000107b8aefe
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 46
1 clang-3.9 0x0000000107b8b349
PrintStackTraceSignalHandler(void*) + 25
2 clang-3.9 0x0000000107b87ae9 llvm::sys::RunSignalHandlers() +
425
3 clang-3.9 0x0000000107b8b6a9 SignalHandler(int) + 345
4 libsystem_platform.dylib 0x00007fff9510852a _sigtramp + 26
5 clang-3.9 0x000000010bc4063d guard variable for
shouldAddRequirement(clang::Module*, llvm::StringRef, bool&)::IOKitAVC + 131661
6 clang-3.9 0x0000000107b8b36b raise + 27
7 clang-3.9 0x0000000107b8b422 abort + 18
8 clang-3.9 0x0000000107b8b401 __assert_rtn + 129
9 clang-3.9 0x000000010ac06da8
clang::VarDecl::evaluateValue(llvm::SmallVectorImpl<std::__1::pair<clang::SourceLocation,
clang::PartialDiagnostic> >&) const + 216
10 clang-3.9 0x000000010ac06c83 clang::VarDecl::evaluateValue()
const + 83
11 clang-3.9 0x000000010aa60ccc
clang::ASTContext::DeclMustBeEmitted(clang::Decl const*) + 1276
12 clang-3.9 0x000000010818b829
clang::CodeGen::CodeGenModule::MustBeEmitted(clang::ValueDecl const*) + 89
13 clang-3.9 0x000000010818f8cd
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 1581
14 clang-3.9 0x0000000108193124
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 404
15 clang-3.9 0x0000000108192f7d
clang::CodeGen::CodeGenModule::HandleCXXStaticMemberVarInstantiation(clang::VarDecl*)
+ 109
16 clang-3.9 0x0000000108308851 (anonymous
namespace)::CodeGeneratorImpl::HandleCXXStaticMemberVarInstantiation(clang::VarDecl*)
+ 97
17 clang-3.9 0x0000000108165921
clang::BackendConsumer::HandleCXXStaticMemberVarInstantiation(clang::VarDecl*)
+ 81
18 clang-3.9 0x000000010a339093
clang::Sema::InstantiateVariableDefinition(clang::SourceLocation,
clang::VarDecl*, bool, bool)::PassToConsumerRAII::~PassToConsumerRAII() + 35
19 clang-3.9 0x000000010a338b95
clang::Sema::InstantiateVariableDefinition(clang::SourceLocation,
clang::VarDecl*, bool, bool)::PassToConsumerRAII::~PassToConsumerRAII() + 21
20 clang-3.9 0x000000010a338b21
clang::Sema::InstantiateVariableDefinition(clang::SourceLocation,
clang::VarDecl*, bool, bool) + 3969
21 clang-3.9 0x000000010a32ed99
clang::Sema::PerformPendingInstantiations(bool) + 1561
22 clang-3.9 0x0000000109ae4afe
clang::Sema::ActOnEndOfTranslationUnit() + 734
23 clang-3.9 0x000000010971c7e0
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 912
24 clang-3.9 0x00000001096431b9 clang::ParseAST(clang::Sema&,
bool, bool) + 1017
25 clang-3.9 0x00000001086df57f
clang::ASTFrontendAction::ExecuteAction() + 511
26 clang-3.9 0x0000000108163b1a
clang::CodeGenAction::ExecuteAction() + 5962
27 clang-3.9 0x00000001086deae0 clang::FrontendAction::Execute()
+ 112
28 clang-3.9 0x0000000108629f31
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1873
29 clang-3.9 0x000000010876e7ef
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4223
30 clang-3.9 0x00000001057c127e cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 4926
31 clang-3.9 0x00000001057b0e7f
ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) + 479
32 clang-3.9 0x00000001057ae9dd main + 3245
33 libdyld.dylib 0x00007fff952ef5ad start + 1</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>