Skip to content

Clang doesn't generate a function when using __array_rank #57133

@philnik777

Description

@philnik777

The code (Godbolt)

#include <__type_traits/integral_constant.h>

template <class T>
struct rank : std::integral_constant<int, __array_rank(T)> {};

template <class T>
void test_rank() {
  static_assert(rank<T>::value == 0);
}

void func() {
  test_rank<void>();
}

generates func(), but doesn't generate test_rank<void>().

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:codegenIR generation bugs: mangling, exceptions, etc.clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions