[PATCH] D140075: [libclang] Expose using shadow types and declarations in libclang.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 1 08:25:24 PST 2023


aaron.ballman added inline comments.


================
Comment at: clang/tools/libclang/CXCursor.cpp:1279-1281
+  if (const UsingType *Using = Ty->getAs<UsingType>())
+    if (const UsingShadowDecl *Shadow = Using->getFoundDecl())
+      if (const auto *TD = dyn_cast_or_null<TypeDecl>(Shadow->getTargetDecl()))
----------------
Hmm, we're exposing `CXType_Using` but here we're not giving back a cursor to the `UsingType` but instead looking through that type to get down to a declaration and are returning that.

Should we split these in two different cursors?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140075/new/

https://reviews.llvm.org/D140075



More information about the cfe-commits mailing list