mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 23:16:06 +00:00

Fix #134356. We accidentally skipped checking derived-to-base conversions because deduction did not strip sugar in the relevant code. This caused deduction failures when a parameter type had an attribute.
17 lines
309 B
C++
17 lines
309 B
C++
// RUN: %clang_cc1 -fsyntax-only %s -verify
|
|
// expected-no-diagnostics
|
|
|
|
template <class T> struct Base {};
|
|
template <class T> struct Derived : Base<T> {};
|
|
|
|
template <class T> void foo(Base<T> *_Nonnull);
|
|
|
|
template <class T> void bar(Base<T> *);
|
|
|
|
|
|
void test() {
|
|
Derived<int> d;
|
|
foo(&d);
|
|
bar(&d);
|
|
}
|