// RUN: %clang_cc1 -fsyntax-only -verify %s
voidf1();structX{voidf2();};structY{friendvoid::f1(){}// expected-error{{friend function definition cannot be qualified with '::'}}
friendvoid X::f2(){}// expected-error{{friend function definition cannot be qualified with 'X::'}}
};template<typename T>structZ{friendvoid T::f(){}// expected-error{{friend function definition cannot be qualified with 'T::'}}
};voidlocal(){voidf();structLocal{friendvoid f(){}// expected-error{{friend function cannot be defined in a local class}}
};}