[LLVMbugs] [Bug 5898] clang++: could have better diagnostic for variable.methodname.() typo
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jul 12 14:47:17 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=5898
Kaelyn Uhrain <rikka at google.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Assignee|unassignedclangbugs at nondot. |rikka at google.com
|org |
--- Comment #2 from Kaelyn Uhrain <rikka at google.com> ---
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.
--
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/20130712/c3640e3b/attachment.html>
More information about the llvm-bugs
mailing list