[clang] [Modules][ObjC] Objective-C categories aren't visible in local submodule visibility (PR #246933)

Ian Anderson via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 30 09:46:45 PST 2026


================
@@ -1495,6 +1498,20 @@ class ASTContext : public RefCountedBase<ASTContext> {
     return ExternalSource;
   }
 
+  /// Set the callback that isDeclVisible() uses for declarations that are not
+  /// unconditionally visible.
+  void
+  setDeclVisibilityCallback(std::function<bool(const NamedDecl *)> Callback) {
+    DeclVisibilityCallback = std::move(Callback);
+  }
+
+  /// Determine whether \p D is visible.
+  ///
+  /// This is for AST-level queries that filter declarations by visibility
+  /// without going through name lookup, such as finding the visible
+  /// categories of an Objective-C class.
----------------
ian-twilightcoder wrote:

Not really sure how much value this actually adds...

https://github.com/llvm/llvm-project/pull/246933


More information about the cfe-commits mailing list