[llvm-commits] [PATCH] Enhance TableGen with ranges and fixits

Jordan Rose jordan_rose at apple.com
Wed Jan 9 17:33:21 PST 2013


On Jan 9, 2013, at 15:00 , Sean Silva <silvas at purdue.edu> wrote:

> On Wed, Jan 9, 2013 at 5:27 PM, Jordan Rose <jordan_rose at apple.com> wrote:
>> And of course, testing actually caught some issues with SMFixIt, so thanks, Sean. Revised patches attached. I've also included the test file I'm using for fixit features, though it has to live up on the Clang side since clang-tblgen is the only user of SMFixIt right now.
> 
> Please make sure that all the generated .inc files are identical
> before and after these patches. (and easy way is to `git init; git add
> **/*.inc` in the build directory, then apply the patches, rebuild the
> .inc files and git diff).

On the LLVM side there are some ordering differences but nothing significant; I assume this comes from TableGen's iteration over maps. (I tried to mostly account for this for the diagnostics by sorting by SMLoc after the fact, but most of the TG emitters don't bother.)

On the Clang side the diagnostics with implicit group "conversion" previously had the generic category of "Semantic Issue" and are now marked as "Value Conversion Issue". I think this is an improvement!

The diagnostics that changed:
- warn_impcast_complex_scalar (discarding imaginary component)
- warn_impcast_float_integer
- warn_impcast_float_precision
- warn_impcast_integer_precision
- warn_impcast_vector_scalar


> As a side note, would it make sense to have these issues be errors
> instead of warnings? Since we strive for a warning free build anyway,
> we might as well make it an error so that code violating it just won't
> get committed (since it won't build), rather than getting committed
> and then someone having to go and fix it up to silence the warning.

Passed up to cfe-dev for other opinions. I think llvm-commits is agnostic here.

Jordan




More information about the llvm-commits mailing list