Pull request 993 in include-what-you-use: Handle new UsingType

1 view
Skip to first unread message

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

unread,
Jan 10, 2022, 1:16:10 PM1/10/22
to include-wh...@googlegroups.com
New pull request 993 by kimgr: Handle new UsingType
https://github.com/include-what-you-use/include-what-you-use/pull/993

Clang added a new AST node in
https://github.com/llvm/llvm-project/commit/e1600db19d6303f84b995acb93, which
shows up in the AST instead of a desugared type.

The presence of a using declaration would be omitted in the AST in favor of the
target type.

Outside of the test suite, we noticed this for <cstdint>, where the integer
types would show up as TypedefTypes in the AST, despite being pulled in via
using-declarations. They now show as UsingTypes. UsingType represents a new
so-called sugar type introduced by way of a using declaration, and links to its
UsingShadowDecl, which in turn makes it possible to chase through the
using-chain.

Report a use of the UsingShadowDecl, which is resolved centrally to the
underlying target decl (desugared typedef) as well as reporting the using-decl
itself. This is consistent with the prior behavior, but should provide better
results for tracking using declarations.

Fixes issue #990


Reply all
Reply to author
Forward
0 new messages