<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 --- - Assertion failed: isa<LabelDecl>(D) && "declaration not instantiated in this scope""
   href="https://llvm.org/bugs/show_bug.cgi?id=28500">28500</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failed: isa<LabelDecl>(D) && "declaration not instantiated in this scope"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.8
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </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>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jtony@ca.ibm.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>Steps to reproduce on linux:
-bash-4.2$ cat r.cpp
template <class T> void bar(T t = [](decltype(t) i){return 0;}(0)) {}
void foo()
{
  bar<int>();
}
-bash-4.2$ pwd
/home/jtony/workitems/132592
-bash-4.2$ cat r.cpp
template <class T> void bar(T t = [](decltype(t) i){return 0;}(0)) {}
void foo()
{
  bar<int>();
}


bash-4.2$ myclang++ r.cpp  -std=c++11
clang:
/home/jtony/build/3_8/llvm-dev.src/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:2811:
llvm::PointerUnion<clang::Decl*, llvm::Smal
lVector<clang::ParmVarDecl*, 4u>*>*
clang::LocalInstantiationScope::findInstantiationOf(const clang::Decl*):
Assertion `isa<LabelDecl>(D) &&
 "declaration not instantiated in this scope"' failed.
0  clang     0x000000001568c4e4 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
+ 68
...
clang version 3.8.0 (tags/RELEASE_380/final)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix


-bash-4.2$ type myclang
myclang is aliased to `/home/jtony/build/runnable/bin/clang'</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>