[all-commits] [llvm/llvm-project] 9f1e9f: [C++20][modules] Fix std::initializer_list recogni...

jijjijj via All-commits all-commits at lists.llvm.org
Wed Dec 11 17:39:09 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9f1e9f682d0a85ea013ccbce6a3ec4ac1be83356
      https://github.com/llvm/llvm-project/commit/9f1e9f682d0a85ea013ccbce6a3ec4ac1be83356
  Author: jijjijj <realjijjijj at gmail.com>
  Date:   2024-12-12 (Thu, 12 Dec 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaDeclCXX.cpp
    A clang/test/Modules/initializer-list-recognition-through-export-and-linkage-issue-118218.cpp

  Log Message:
  -----------
  [C++20][modules] Fix std::initializer_list recognition if it's exported out of a module (#118537)

If the std::initializer_list is exported out of module, its
`DeclContext` is not a namespace as `Sema::isStdInitializerList`
expects, but an `Decl::Kind::Export` and only its parent is a namespace.
So this commit makes `Sema::isStdInitializerList` account for that.

I'm really new to clang so I'm not 100% sure that was the issue, it
seems so and it fixes compilation. Also I probably need to add tests but
I'd like someone to approve the idea first.

Fixes https://github.com/llvm/llvm-project/issues/118218



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