mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
Always take into account both the lookup access specifier and the declaration. When set, lookup access specifier takes precedence. When not set, we have two use cases: 1. This is not a record member, so no access is specified at all. Treat this as public. 2. This is a record member of a base class. Treat this as private. [Reference](https://github.com/llvm/llvm-project/blob/4b1d7827c07381610ad4fa7bd9d1a9659008b963/clang/include/clang/AST/DeclCXX.h#L1724). Also, deduplicate access mapping between import and overload resolution. Background: https://github.com/carbon-language/carbon-lang/pull/6221#issuecomment-3407981790 Part of #5859.