[LLVMbugs] [Bug 18608] New: bad typo correction on method call suggesting qualifier
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jan 24 17:05:46 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=18608
Bug ID: 18608
Summary: bad typo correction on method call suggesting
qualifier
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: nlewycky at google.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
This testcase:
struct A {
virtual void f() const;
virtual void f(int x) const;
};
struct B : public A {
virtual void f() const;
};
void test(B b) {
b.f(1);
}
Emits this diagnostic:
b5432234.cc:11:3: error: too many arguments to function call, expected 0, have
1; did you mean 'A::f'?
b.f(1);
^~~
A::f
b5432234.cc:3:14: note: 'A::f' declared here
virtual void f(int x) const;
^
1 error generated.
The typo correction is suggesting that I call "A::f.f(1);" (try -cc1 -fixit!).
It should be suggesting "b.A::f(1);".
--
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/20140125/7d57955c/attachment.html>
More information about the llvm-bugs
mailing list