// RUN: not %clang_cc1 -std=c++11 %s -fsyntax-only 2>&1 | FileCheck %s
// RUN: %clang_cc1 -std=c++11 %s -fsyntax-only -DWARN 2>&1 | FileCheck %s --check-prefix=CHECK-WARN
// Ensure that the diagnostics we produce for this situation appear in a
// deterministic order. This requires ADL to provide lookup results in a
// deterministic order.
;
;
;
void
// We don't really care which order these two diagnostics appear (although the
// order below is source order, which seems best). The crucial fact is that
// there is one single order that is stable across multiple runs of clang.
//
// CHECK: no type named 'error' in 'X'
// CHECK: no type named 'error' in 'Y'
// CHECK: no matching function for call to 'f'
;
int *p = + 0;
// CHECK: no type named 'error' in 'Oper'
// CHECK: in instantiation of template class 'Error<Oper, int *>'
// CHECK: no type named 'error' in 'Oper'
// CHECK: in instantiation of template class 'Error<Oper, float *>'
// CHECK: no type named 'error' in 'Oper'
// CHECK: in instantiation of template class 'Error<Oper, X *>'
// CHECK: no type named 'error' in 'Oper'
// CHECK: in instantiation of template class 'Error<Oper, Y *>'
;
int undef_but_used = UndefButUsed<int> + UndefButUsed<float> + UndefButUsed<char> + UndefButUsed<void>;
// CHECK-WARN: inline function 'UndefButUsed<int>::f' is not defined
// CHECK-WARN: inline function 'UndefButUsed<float>::f' is not defined
// CHECK-WARN: inline function 'UndefButUsed<char>::f' is not defined
// CHECK-WARN: inline function 'UndefButUsed<void>::f' is not defined