[llvm-bugs] [Bug 27009] New: [ms] no matching member function for call when argument has a __restrict qualifier
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Mar 21 03:15:46 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27009
Bug ID: 27009
Summary: [ms] no matching member function for call when
argument has a __restrict qualifier
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: andrey.kuleshov at intel.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
!- 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============
>>>clang:
test.cpp(20,10) : error: no matching member function for call to 'foo'
m_t.foo(p);
>>>msvc:
<no diagnostics>
Andrey Kuleshov
======
Software Engineer
Intel Compiler Team
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160321/8a4d95ac/attachment.html>
More information about the llvm-bugs
mailing list