<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 --- - [ms] no matching member function for call when argument has a __restrict qualifier"
href="https://llvm.org/bugs/show_bug.cgi?id=27009">27009</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[ms] no matching member function for call when argument has a __restrict qualifier
</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>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>andrey.kuleshov@intel.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>!- In this case clang cannot find matching function for a call, when an
argument that is passed to a function call is declared with a __restrict
qualifier.
This problem appears only with template classes.
MSVC can compile such code without any errors. -!
========Environment=========
OS: Win
Language: c++
Version: trunk
========Reproducer==========
template< class T >
class C{
public:
void foo();
void foo(const T& src);
};
struct B{
int a;
};
class A {
C<B *> m_t;
void bar(){
B *
#ifndef OK // use "clang-cl -DOK test.cpp" to remove an error
__restrict
#endif
p;
m_t.foo(p);
}
};
==========Error============
<span class="quote">>>>clang:</span >
test.cpp(20,10) : error: no matching member function for call to 'foo'
m_t.foo(p);
<span class="quote">>>>msvc:</span >
<no diagnostics>
Andrey Kuleshov
======
Software Engineer
Intel Compiler Team</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>