<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Regression 9.0.0-RC1 Assertion failed: (!E || isa<FunctionParmPackExpr>(E)) && "missing non-odr-use marking for unevaluated decl ref","
   href="https://bugs.llvm.org/show_bug.cgi?id=42861">42861</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Regression 9.0.0-RC1 Assertion failed: (!E || isa<FunctionParmPackExpr>(E)) && "missing non-odr-use marking for unevaluated decl ref",
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>9.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jvapen@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Failure on windows: (compiles with 7.0.0)

// clang-cl.exe /nologo /c -w  /EHsc  /std:c++17 t.cpp 
#include <typeinfo>

struct A {
  virtual ~A() = default;
};

struct __declspec(dllexport) B : A {};

template <typename T> struct C { void f(const T &); };
struct __declspec(dllexport) D : C<B> {};

template <class T> void C<T>::f(const T &t) {
  [&t](auto) { typeid(t); }(0);
}


Error
=====
Assertion failed: (!E || isa<FunctionParmPackExpr>(E)) && "missing non-odr-use
marking for unevaluated decl ref", file
C:\src\llvm_package_900-rc1\llvm\tools\clang\lib\Sema\SemaExpr.cpp, line 16401
Stack dump:
0.      Program arguments: clang-cl.exe -cc1 -triple
x86_64-pc-windows-msvc19.16.27027 -emit-obj -mrelax-all
-mincremental-linker-compatible -disable-free -main-file-name t.cpp
-mrelocation-model pic -pic-level 2 -mthread-model posix -relaxed-aliasing
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu
x86-64 -mllvm -x86-asm-syntax=intel -D_MT -flto-visibility-public-std
--dependent-lib=libcmt --dependent-lib=oldnames -stack-protector 2
-fcxx-exceptions -fexceptions -fexternc-nounwind -fms-volatile
-fdiagnostics-format msvc -dwarf-column-info -coverage-notes-file t.gcno
-resource-dir LLVM_9_0_0-RC1\lib\clang\9.0.0 -internal-isystem
LLVM_9_0_0-RC1\lib\clang\9.0.0\include -internal-isystem
C:\DevStudio\Vs2017\VC\Tools\MSVC\14.16.27023\ATLMFC\include -internal-isystem
C:\DevStudio\Vs2017\VC\Tools\MSVC\14.16.27023\include -internal-isystem
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -internal-isystem
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt
-internal-isystem C:\Program Files (x86)\Windows
Kits\10\include\10.0.17763.0\shared -internal-isystem C:\Program Files
(x86)\Windows Kits\10\include\10.0.17763.0\um -internal-isystem C:\Program
Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -internal-isystem
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt -w
-fdeprecated-macro -fdebug-compilation-dir F:\Other\tests\assert_odr
-ferror-limit 19 -fmessage-length 172 -fno-use-cxa-atexit -fms-extensions
-fms-compatibility -fms-compatibility-version=19.16.27027 -std=c++17
-fdelayed-template-parsing -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -faddrsig -o t.obj -x c++ t.cpp
1.      <eof> parser at end of file
2.      t.cpp:9:39: instantiating function definition 'C<B>::f'
3.      t.cpp:13:3: instantiating function definition 'C<B>::f(const B
&)::(anonymous class)::operator()<int>'
 #0 0x00007ff68299a126 (clang-cl.exe+0x1dda126)
 #1 0x00007ffa2790d167 (C:\Windows\System32\ucrtbase.dll+0x6d167)
 #2 0x00007ffa2790dff1 (C:\Windows\System32\ucrtbase.dll+0x6dff1)
 #3 0x00007ffa2790fd5a (C:\Windows\System32\ucrtbase.dll+0x6fd5a)
 #4 0x00007ffa2790fc51 (C:\Windows\System32\ucrtbase.dll+0x6fc51)
 #5 0x00007ffa2790ffaf (C:\Windows\System32\ucrtbase.dll+0x6ffaf)
 #6 0x00007ff6843dba2d (clang-cl.exe+0x381ba2d)
 #7 0x00007ff6843835b4 (clang-cl.exe+0x37c35b4)</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>