Pull request 920 in include-what-you-use: Improve detection of builtin functions

0 views
Skip to first unread message

notifi...@include-what-you-use.org

unread,
May 22, 2021, 1:23:53 PMMay 22
to include-wh...@googlegroups.com
New pull request 920 by kimgr: Improve detection of builtin functions
https://github.com/include-what-you-use/include-what-you-use/pull/920

The technique used before relied on linear search of all builtins by
name. This did not work with qualified C++ names of C library names such
as std::pow and std::round.

Use ASTContext to get to BuiltinInfo, and in turn use that to check more
specific traits of the builtin by ID instead of name.

Fixes issue #918.

notifi...@include-what-you-use.org

unread,
May 28, 2021, 2:49:36 PMMay 28
to include-wh...@googlegroups.com
Comment #0 on pull request 920 by kimgr: Improve detection of builtin functions
https://github.com/include-what-you-use/include-what-you-use/pull/920

@carlosgalvezp @avostrik Could you take this for a spin and let me know if it solves your respective issues in context? Thanks!

notifi...@include-what-you-use.org

unread,
May 29, 2021, 12:43:33 PMMay 29
to include-wh...@googlegroups.com
Comment #2 on pull request 920 by carlosgalvezp: Improve detection of builtin functions
https://github.com/include-what-you-use/include-what-you-use/pull/920

@kimgr Just tested it and it works perfectly on my issue, thanks a lot! I wonder if it makes sense to add a unit test for this to make sure it doesn't pop up again?

notifi...@include-what-you-use.org

unread,
Jun 5, 2021, 4:06:00 AMJun 5
to include-wh...@googlegroups.com
Comment #3 on pull request 920 by kimgr: Improve detection of builtin functions
https://github.com/include-what-you-use/include-what-you-use/pull/920

@carlosgalvezp Thanks for testing. Oh, and thanks for keeping me honest -- I was so excited I got it to work that I forgot about regression testing :clown_face:. Will update shortly.

Reply all
Reply to author
Forward
0 new messages