Re: [RFC] Clang plugin for catching suspicious typedef casting

Поиск
Список
Период
Сортировка
От Dmitry Dolgov
Тема Re: [RFC] Clang plugin for catching suspicious typedef casting
Дата
Msg-id 20231203142747.ihghenhq36pihlnx@erthalion.local
обсуждение исходный текст
Ответ на Re: [RFC] Clang plugin for catching suspicious typedef casting  ("Tristan Partin" <tristan@neon.tech>)
Ответы Re: [RFC] Clang plugin for catching suspicious typedef casting  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
> 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!



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dmitry Dolgov
Дата:
Сообщение: Re: Schema variables - new implementation for Postgres 15
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Refactoring backend fork+exec code