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

Jordan Rose jordan_rose at apple.com
Tue Dec 11 13:33:27 PST 2012


Jakob explained to me offline that the uniquing of Inits is useful, and this breaks it for DefInits. I'm going to try to rework this by saving the source ranges for superclasses in each Record instead.


On Dec 11, 2012, at 9:44 , Jordan Rose <jordan_rose at apple.com> wrote:

> Hi, Jakob et al. I've been working on adding a warning to Clang-side TableGen, and realized everyone would hate it if it didn't have fixits. So I went in and added the necessary information to TableGen so that it can (a) track anonymous definitions, (b) save source ranges for DefInits (for the fixit), and (c) actually emit fixits.
> 
> The fixit work is fine, I think; it's added to SMDiagnostic, so actually any LLVM-level diagnostics could take advantage of it. My main worry is about the range-tracking info. TableGen currently doesn't do any memory management, but it does unique identical definitions. Once we're tracking source info, though, that uniquing isn't possible. Do we care, or is it okay because it's TableGen and it only runs once and then exits?
> 
> I'll post the Clang side of the patch on cfe-commits soon.
> 
> Thanks!
> Jordan
> 
> <0001-TableGen-record-anonymous-instantiations-of-classes.patch><0002-TableGen-save-source-ranges-for-DefInits.patch><0003-Add-basic-fix-its-to-SMDiagnostic.patch>




More information about the llvm-commits mailing list