> On Fri, Dec 01, 2023 at 04:01:05PM -0600, Tristan Partin wrote: > On Fri Aug 4, 2023 at 5:47 AM CDT, Dmitry Dolgov wrote: > > > On Thu, Aug 03, 2023 at 12:23:52PM -0500, Tristan Partin wrote: > > > > > > This is the first I am learning about clang plugins. Interesting concept. > > > Did you give any thought to using libclang instead of a compiler plugin? I > > > am kind of doing similar work, but I went with libclang instead of a > > > plugin. > > > > Nope, never thought about trying libclang. From the clang documentation > > it seems a plugin is a suitable interface if one wants to: > > > > special lint-style warnings or errors for your project > > > > Which is what I was trying to achieve. Are there any advantages of > > libclang that you see? > > Only advantage I see to using libclang is that you can run programs built > with libclang regardless of what your C compiler is. I typically use GCC. > > I think your idea of automating this kind of thing is great no matter how it > is implemented.
Yeah, absolutely. Sorry, haven't had a chance to follow up on the patch, but I'm planing to do so. I guess the important part, as Peter mentioned above in the thread, is to figure out more use cases which could be usefully augmented with such compile time checks. At the moment I don't have any other except BlockNumber vs Buffer, so I'm going to search through the hackers looking for more potential targets. If anyone got a great idea right away about where compile-time checks could be useful, feel free to share!