[cfe-commits] [patch] Add a fixit for -Wnull-conversion
David Blaikie
dblaikie at gmail.com
Sat Mar 17 20:22:30 PDT 2012
Here's a small patch to add a fixit hint for the -Wnull-conversion
warning that uses our existing zero/default initialization support
code. It looks like this:
null.cpp:5:11: warning: implicit conversion of NULL constant to 'int'
[-Wnull-conversion]
int i = NULL;
~ ^~~~
0
null.cpp:6:12: warning: implicit conversion of NULL constant to 'char'
[-Wnull-conversion]
char c = NULL;
~ ^~~~
'\0'
The main question is whether it's OK to make this a fixit on the
warning itself, since it has no semantic change (& minimal change to
the AST), or whether it's still something that should be on a separate
note.
Thoughts?
Thanks,
- David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: null_fixit.diff
Type: application/octet-stream
Size: 2138 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120317/e1eeb448/attachment.obj>
More information about the cfe-commits
mailing list