[PATCH] D131651: [AST] [Modules] Introduce Decl::getNonTransparentDeclContext to handle exported friends

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 11 06:21:17 PDT 2022


erichkeane added a comment.

I think this is fine.  I vaguely remember doing something like this in the past, but I can't seem to figure out what it was...



================
Comment at: clang/lib/AST/DeclBase.cpp:1037
+  assert(getDeclContext());
+  return getDeclContext()->getNonTransparentContext();
+}
----------------
so why are we calling this on our `DeclContext` here, which is the 'parent' of the current `Decl`?  Shouldn't this be casting itself to `DeclContext` and calling this function on it, so we don't end up 'skipping' the first parent?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131651



More information about the cfe-commits mailing list