8000 [clang] Assertion `BaseTy->castAs<RecordType>()->getDecl()->getCanonicalDecl() == FD->getParent()->getCanonicalDecl() && "record / field mismatch"' failed. · Issue #140370 · llvm/llvm-project · GitHub
[go: up one dir, main page]

Skip to content

[clang] Assertion `BaseTy->castAs<RecordType>()->getDecl()->getCanonicalDecl() == FD->getParent()->getCanonicalDecl() && "record / field mismatch"' failed. #140370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
k-arrows opened this issue May 17, 2025 · 2 comments
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" crash Prefer [crash-on-valid] or [crash-on-invalid]

Comments

@k-arrows
Copy link

Reproducer:
https://godbolt.org/z/a3jnKEz54

template <class T> void f(T);

template <class U> class C {
  template <class T> friend void f(T) {
    C<U> c;
    c.i = 0;
  }

  int i;
};

int main() {
  f(0);
  C<float> c;
}
@llvmbot llvmbot added the clang Clang issues not falling into any other category label May 17, 2025
@k-arrows k-arrows added crash Prefer [crash-on-valid] or [crash-on-invalid] clang:frontend Language frontend issues, e.g. anything involving "Sema" and removed clang Clang issues not falling into any other category labels May 17, 2025
@llvmbot
Copy link
Member
llvmbot commented May 17, 2025

@llvm/issue-subscribers-clang-frontend

Author: None (k-arrows)

Reproducer: https://godbolt.org/z/a3jnKEz54 ```cpp template <class T> void f(T);

template <class U> class C {
template <class T> friend void f(T) {
C<U> c;
c.i = 0;
}

int i;
};

int main() {
f(0);
C<float> c;
}

</details>

@EugeneZelenko
Copy link
Contributor

@k-arrows: You could set labels and type during issues creation, so default labels will not be added. This will save a little bit of time for you and reduce number of notifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" crash Prefer [crash-on-valid] or [crash-on-invalid]
Projects
None yet
Development

No branches or pull requests

3 participants
0