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
null_fixit.diff
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
