Hi, my name is Jason Switzer and I have been wanting to help out with LLVM for some time. I decided to start by going through the bug database and doing some wrangling (updating, verifying current behavior versus reported, etc) as it seemed like the easiest way to learn the code base. So far, I've found there are many low hanging fruit in the "quality-of-implementation" bugs, and I've run into some bugs that are rather aged. For example, I posted the following to bug 4665 (<a href="http://llvm.org/bugs/show_bug.cgi?id=4665">http://llvm.org/bugs/show_bug.cgi?id=4665</a>):<div>
<br></div><div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
This bug appears to be no longer an issue. As of r148640, the following is produced:</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
$ echo "int main() { unsigned int foo = -2; return foo; }" | clang -Wconversion -x c++ -</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<stdin>:1:33: warning: implicit conversion changes signedness: 'int' to 'unsigned int' [-Wsign-conversion]</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
int main() { unsigned int foo = -2; return foo; }</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                          ~~~   ^~</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<stdin>:1:44: warning: implicit conversion changes signedness: 'unsigned int' to 'int' [-Wsign-conversion]</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
int main() { unsigned int foo = -2; return foo; }</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                                    ~~~~~~ ^~~</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
2 warnings generated.</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
The author of this bug was trying to use -Wall, which I'm not sure is valid for clang (it is for GCC, which reports this under -Wsign-compare). That being said, there is -Wconversion, which emits the "warn_impcast_integer_sign" warning (-Weverything turns on -Wconversion) at SemaChecking.cpp:3926.</blockquote>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br></blockquote>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Given that it picked up both implicit casts and reported them as a warning when requested, this bug should probably be considered RESOLVED.</blockquote>
<div><br></div><div>This bug was reported 2.5 years ago and hasn't seen a status change in 2 years. I don't feel right changing the status of this without someone else at least seeing it and I'm afraid any email that bugzilla would send might get overlooked by those that could do meaningful review.</div>
</div><div><br></div><div>So what's the current LLVM / Clang way of dealing with this? As a someone who's just getting started with LLVM, I'd like to help, but I would hate to pump a ton of time going through a bunch of bugs only to have my help/feedback ignored. Should I double post my comments (<a href="http://llvm.org/bugs">llvm.org/bugs</a> and cfe-dev)? I'm guessing that if I have a patch to make, I should post it to cfe-commits, but I am afraid that such small issues/changes might get lost there as well.</div>
<div><br></div><div>-Jason "s1n" Switzer</div>