[PATCH] D108403: Fix assertion when generating diagnostic for inline namespaces

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 19 13:01:46 PDT 2021


erichkeane added a comment.

This whole function seems a little suspect, but I don't have a good example of a place it would break.  Is there no cases where a lookup could result in the same COUNT but different declaration set? I guess it is more the question of whether a transparent context can 'lose' a name lookup (perhaps a case of conflicting names?), then have it added by the local namespace.



================
Comment at: clang/include/clang/AST/Decl.h:620
+    const DeclContext *Parent = getParent();
+    while (Parent->isTransparentContext())
+      Parent = Parent->getParent();
----------------
This loop seems useful enough to be its own function in DeclContext?  I think I remember seeing us do this for a different patch, right?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108403



More information about the cfe-commits mailing list