[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / CXX / basic / basic.lookup / basic.lookup.classref / p1-cxx11.cpp
blob1afea99e8895c7061bf825c4c1d3ad0ce90a99a8
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
3 template<typename T>
4 struct set{};
5 struct Value {
6 template<typename T>
7 void set(T value) {}
9 void resolves_to_same() {
10 Value v;
11 v.set<double>(3.2);
14 void resolves_to_different() {
16 Value v;
17 // The fact that the next line is a warning rather than an error is an
18 // extension.
19 v.set<double>(3.2);
22 int set; // Non-template.
23 Value v;
24 v.set<double>(3.2);
28 namespace rdar9915664 {
29 struct A {
30 template<typename T> void a();
33 struct B : A { };
35 struct C : A { };
37 struct D : B, C {
38 A &getA() { return static_cast<B&>(*this); }
40 void test_a() {
41 getA().a<int>();
46 namespace PR11856 {
47 template<typename T> T end(T);
49 template <typename T>
50 void Foo() {
51 T it1;
52 if (it1->end < it1->end) {
56 template<typename T> T *end(T*);
58 class X { };
59 template <typename T>
60 void Foo2() {
61 T it1;
62 if (it1->end < it1->end) {
65 X *x;
66 if (x->end < 7) { // expected-error{{no member named 'end' in 'PR11856::X'}}