Re: backend *.c #include cleanup (IWYU)
От
Peter Eisentraut
Тема
Re: backend *.c #include cleanup (IWYU)
Дата
Msg-id
b3e514f8-4fa3-4a1f-b3c2-7dcb3cd9b20b@eisentraut.org
Ответ на
Re: backend *.c #include cleanup (IWYU) (Nathan Bossart)
Список
Дерево обсуждения
backend *.c #include cleanup (IWYU) Peter Eisentraut <peter@eisentraut.org>
Re: backend *.c #include cleanup (IWYU) Nathan Bossart <nathandbossart@gmail.com>
Re: backend *.c #include cleanup (IWYU) Peter Eisentraut <peter@eisentraut.org>
Re: backend *.c #include cleanup (IWYU) Nathan Bossart <nathandbossart@gmail.com>
Re: backend *.c #include cleanup (IWYU) Tom Lane <tgl@sss.pgh.pa.us>
Re: backend *.c #include cleanup (IWYU) Andres Freund <andres@anarazel.de>
Re: backend *.c #include cleanup (IWYU) Andres Freund <andres@anarazel.de>
Re: backend *.c #include cleanup (IWYU) Peter Eisentraut <peter@eisentraut.org>
Re: backend *.c #include cleanup (IWYU) Peter Eisentraut <peter@eisentraut.org>
Re: backend *.c #include cleanup (IWYU) Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: backend *.c #include cleanup (IWYU) "Tristan Partin" <tristan@neon.tech>
On 10.02.24 21:13, Nathan Bossart wrote: >> (Interestingly, IWYU has been mentioned in src/tools/pginclude/README since >> 2012. Has anyone else played with it? Was it not mature enough back then?) > I haven't played with it at all, but the topic reminds me of this thread: > > https://postgr.es/m/flat/CALDaNm1B9naPDTm3ox1m_yZvOm3KA5S4kZQSWWAeLHAQ%3D3gV1Q%40mail.gmail.com Approaches like that as well as the in-tree pgrminclude work by "I removed the #include and it still compiled fine", which can be unreliable. IWYU on the other hand has the compiler tracking where a symbol actually came from, and so if it says that an #include is not used, then it's pretty much correct by definition.
В списке pgsql-hackers по дате отправления