1 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
2 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++98 -Wno-c++11-extensions
13 int begin(Range
); // expected-note {{not viable}}
20 bool operator!=(iter
);
23 iter
begin(ADL
); // expected-note {{not viable}}
28 NS::iter
begin(NS::NoADL
); // expected-note {{not viable}}
29 NS::iter
end(NS::NoADL
);
33 for (auto b
: S()) {} // ok
34 for (auto b
: T()) {} // expected-error {{invalid range expression of type 'T'}}
35 for (auto b
: a
) {} // ok
36 for (int b
: NS::ADL()) {} // ok
37 for (int b
: NS::NoADL()) {} // expected-error {{invalid range expression of type 'NS::NoADL'}}
41 void (*vv
[])() = {PR11601
, PR11601
, PR11601
};
42 for (void (*i
)() : vv
) i();