[X86] Move getGFNICtrlMask before CTLZ/CTTZ lowering. NFC.
[llvm-project.git] / clang / test / SemaCXX / friend-template-redecl.cpp
blob4ee03c6f6387f7415c89f14f217a0d6a25b8ea72
1 // RUN: %clang_cc1 -std=c++17 -verify -emit-llvm-only %s
3 template <class T> void bar(const T &t) { foo(t); }
5 template <class>
6 struct HasFriend {
7 template <class T>
8 friend void foo(const HasFriend<T> &m) noexcept(false);
9 };
11 template <class T>
12 void foo(const HasFriend<T> &m) noexcept(false) {}
14 void f() {
15 HasFriend<int> x;
16 foo(x);
17 bar(x);
20 template<typename T> void droid();
21 struct X {
22 template<typename T> friend void ::droid();
23 template<int N> friend void ::droid(); // expected-error {{does not match}}
24 // FIXME: We should produce a note for the above candidate explaining why
25 // it's not the droid we're looking for.