[all-commits] [llvm/llvm-project] 9d2209: [Clang] Remove `IDNS_Ordinary` flag in `IndirectFi...

Yanzuo Liu via All-commits all-commits at lists.llvm.org
Fri Jul 26 05:40:07 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9d220956320a36fd127ee14ed41f0ecdcc0fb5b0
      https://github.com/llvm/llvm-project/commit/9d220956320a36fd127ee14ed41f0ecdcc0fb5b0
  Author: Yanzuo Liu <zwuis at outlook.com>
  Date:   2024-07-26 (Fri, 26 Jul 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/AST/DeclBase.cpp
    A clang/test/Parser/namelookup-anonymous-struct.c

  Log Message:
  -----------
  [Clang] Remove `IDNS_Ordinary` flag in `IndirectFieldDecl::IdentifierNamespace` (#100525)

There is a `IDNS_Ordinary` flag in
`IndirectFieldDecl::IdentifierNamespace` so that members in nested
anonymous struct/union can be found as ordinary identifiers.

```c
struct S {
  struct { int x; };
  // Previous behaviour: `x` in previous line is found
  // Expected: nothing is found
  int arr[sizeof(x)];
};
```

This PR fixes this issue.

Fixes #31295.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list