<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:rikka@google.com" title="Kaelyn Uhrain <rikka@google.com>"> <span class="fn">Kaelyn Uhrain</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - clang++: could have better diagnostic for variable.methodname.() typo"
href="http://llvm.org/bugs/show_bug.cgi?id=5898">bug 5898</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr>
<tr>
<td style="text-align:right;">Assignee</td>
<td>unassignedclangbugs@nondot.org
</td>
<td>rikka@google.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - clang++: could have better diagnostic for variable.methodname.() typo"
href="http://llvm.org/bugs/show_bug.cgi?id=5898#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - clang++: could have better diagnostic for variable.methodname.() typo"
href="http://llvm.org/bugs/show_bug.cgi?id=5898">bug 5898</a>
from <span class="vcard"><a class="email" href="mailto:rikka@google.com" title="Kaelyn Uhrain <rikka@google.com>"> <span class="fn">Kaelyn Uhrain</span></a>
</span></b>
<pre>As of r186208 clang gives a better diagnostic.
For the original example, which had another error lurking undetected with it:
$ cat x.cpp
class A {
public:
const char *str();
};
int foo(A &x)
{
return x.str.();
}
$ ./bin/clang++ -fsyntax-only x.cpp
x.cpp:8:15: error: unexpected '.' in function call; perhaps remove the '.'?
return x.str.();
~~~~~^
x.cpp:8:10: error: cannot initialize return object of type 'int' with an rvalue
of type
'const char *'
return x.str.();
^~~~~~~~
2 errors generated.</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>