
declarations. We can't expect to find them in the canonical definition of the class, because that's not where they live. This means we no longer reject real ODR violations with friend declarations, but we weren't consistently doing so anyway. llvm-svn: 216369
20 lines
250 B
C++
20 lines
250 B
C++
extern struct Y {
|
|
int n;
|
|
float f;
|
|
} y1;
|
|
enum E { e1 };
|
|
|
|
struct X {
|
|
int n;
|
|
} x1;
|
|
|
|
template<typename T>
|
|
struct F {
|
|
int n;
|
|
friend bool operator==(const F &a, const F &b) { return a.n == b.n; }
|
|
};
|
|
|
|
int f() {
|
|
return y1.n + e1 + y1.f + x1.n;
|
|
}
|