llvm-project/clang/test/Sema/nullability-and-template-deduction.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
309 B
C++
Raw Normal View History

// 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);
}