<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 - clang-cl fails with "cannot compile this scalar expression yet""
href="https://bugs.llvm.org/show_bug.cgi?id=48834">48834</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang-cl fails with "cannot compile this scalar expression yet"
</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>Linux
</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>hans@chromium.org
</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>Repro:
$ cat /tmp/a.ii
enum { a };
template <int> struct b { static const int c = a; };
namespace d {
template <int> class e {
protected:
template <typename f> int g(f, int, void *);
};
template <class ad> class h : e<ad::c> {
int i;
void *j;
virtual int k() { return g(this, i, j); }
};
}
template <typename> class m;
template <int l> class m<b<l>> : d::h<b<l>> {};
namespace d {
template <typename f, typename ag> void ah(ag) { f(0); }
}
using d::ah;
class n : m<b<a>> {
public:
n(int) {}
};
void aj() { ah<n>(aj); }
$ clang -cc1 -triple x86_64-pc-windows-msvc19.22.27905 -emit-obj
-fms-extensions -fms-compatibility -fdelayed-template-parsing -x c++ /tmp/a.ii
/tmp/a.ii:11:28: warning: use of identifier 'g' found via unqualified lookup
into dependent bases of class templates is a Microsoft extension
[-Wmicrosoft-template]
virtual int k() { return g(this, i, j); }
^
this->
/tmp/a.ii:22:3: note: in instantiation of member function 'd::h<b<0>>::k'
requested here
n(int) {}
^
/tmp/a.ii:6:29: note: must qualify identifier to find this declaration in
dependent base class
template <typename f> int g(f, int, void *);
^
/tmp/a.ii:11:28: error: cannot compile this scalar expression yet
virtual int k() { return g(this, i, j); }
^~~~~~~~~~~~~
Unexpected placeholder builtin type!
UNREACHABLE executed at
/work/llvm.monorepo/clang/lib/CodeGen/CodeGenTypes.cpp:597!</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>