[all-commits] [llvm/llvm-project] 86ba68: [Clang][Sema] Disable checking invalid template id...

Yanzuo Liu via All-commits all-commits at lists.llvm.org
Wed May 14 01:25:24 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 86ba681e286d0a377830d2cbbc5e58bb5fad442c
      https://github.com/llvm/llvm-project/commit/86ba681e286d0a377830d2cbbc5e58bb5fad442c
  Author: Yanzuo Liu <zwuis at outlook.com>
  Date:   2025-05-14 (Wed, 14 May 2025)

  Changed paths:
    M clang/lib/Sema/SemaTemplate.cpp
    A clang/test/SemaCXX/libstdcxx_format_kind_hack.cpp

  Log Message:
  -----------
  [Clang][Sema] Disable checking invalid template id in initializer of primary variable template `std::format_kind` with libstdc++ (#139560)

#134522 triggers compilation error with libstdc++, in which primary
variable template `std::format_kind` is defined like

```cpp
template <typename R>
constexpr auto format_kind =
__primary_template_not_defined(
  format_kind<R>
);
```

See #139067 or <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120190>.

This PR disables checking template id in initializer of primary variable
template `std::format_kind` in libstdc++ (by checking `__GLIBCXX__`).

Fixes #139067



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