[llvm-bugs] [Bug 32645] New: fixit hint for missing
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Apr 12 15:10:01 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32645
Bug ID: 32645
Summary: fixit hint for missing
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: nlewycky at google.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
We do typo correction for . vs -> but we should also do "turn 'foo' into
'(*foo)'.
Testcase:
struct X { void foo(); };
void f() {
X x1;
X *x2 = &x1;
X **x3 = &x2;
x3->foo();
*x3->foo();
}
$ clang++ b13503858.cc
b13503858.cc:6:5: error: member reference base type 'X *' is not a structure or
union
x3->foo();
~~^ ~~~
b13503858.cc:7:6: error: member reference base type 'X *' is not a structure or
union
*x3->foo();
~~^ ~~~
2 errors generated.
Both of those should read "(*x3)->foo();", in both cases we're missing
parentheses and in the first case we're missing the * to dereference too.
--
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/20170412/5818aa61/attachment.html>
More information about the llvm-bugs
mailing list