[clang] [Sema] Reject unqualified lookup of local nested class name (PR #192678)

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 19 20:17:51 PDT 2026


================

----------------
zwuis wrote:

It seems that my question is still not clear. 🤦 You added these `if` to handle

```cpp
void f() {
  struct A { struct B; };
  struct A::B {};
  B b;
}
```

, but Clang already handles

```
struct A { struct B; };
struct A::B {};
B b;
```

(not in function body) correctly without these if. Could you please tell, in our implementation, how/why Clang handled (before this PR) them differently?

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


More information about the cfe-commits mailing list