<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 - [msvc compat] clang++ assertion in MergeAccess when using __super"
href="https://bugs.llvm.org/show_bug.cgi?id=41604">41604</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[msvc compat] clang++ assertion in MergeAccess when using __super
</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>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>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mike.winterberg@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Note: I'm compiling with clang++ from the daily-ish
LLVM-9.0.0-r358402-win64.exe. Perhaps notably, from the nightly .deb
svn359077-1~exp1+0~20190424091502.2471~gbpac4d8e, the assertion isn't hit, but
I'm uncertain if those are compiled with assertions enabled.
When using the __super extension to access a function that is overloaded and
has different access specifiers from a super-super class, the assertion
Assertion failed: DeclAccess != AS_none, file
C:\src\llvm_package_358402\llvm\tools\clang\include\clang/AST/DeclCXX.h, line
1873
is hit.
$ clang++ -fms-extensions super_test.cc
struct A
{
int get_val(int index) const;
private:
int get_val() const;
};
struct B : A
{
};
struct C : B
{
int bob() const;
};
int C::bob() const
{
return __super::get_val(1) + 1;
}
In real life, both get_val's are virtual and get_val(int) is overridden by C so
using __super is "necessary", but that isn't strictly necessary to trigger the
assertion.
Changing C to directly inherit from A instead of B avoids the assertion.</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>