[cfe-dev] My first patch to clang
Nicola Gigante
nicola.gigante at gmail.com
Fri Dec 4 08:37:05 PST 2009
Hello,
as promised I've started to look at how clang works under the hood.
My first "kid job" was to implement a simple diagnostic improvement that suggests to use -> instead of . if the base expression is a pointer. You find the patch attached.
In the last mail, Douglas told me to send trivial patches to cfe-commits but I've prefered to post it here because it's the first one and I'm unsure about a couple of things.
1) Have I chosen the right locations for the caret, the range and the substitution? The original error used to put the caret _after_ the dot, but I put the caret _at_ the dot, because I think it's more reasonable.
2) Is it ok to add a new diagnostic string in this case? Are the string and the enum name appropriate?
3) Any other hint?
Thanks,
Nicola
-------------- next part --------------
A non-text attachment was scrubbed...
Name: member_pointer_suggestion.patch
Type: application/octet-stream
Size: 2254 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091204/ba5448e1/attachment.obj>
More information about the cfe-dev
mailing list