Lines Matching full:explicit
40 // Target: int $explicit^foo();
97 for (auto RT : {RefType::Explicit, RefType::Implicit, RefType::Ambiguous}) {
114 testWalk("int $explicit^x;", "int y = ^x;");
115 testWalk("int $explicit^foo();", "int y = ^foo();");
116 testWalk("namespace ns { int $explicit^x; }", "int y = ns::^x;");
119 testWalk("extern int $explicit^x; int x;", "int y = ^x;");
121 testWalk("struct S{}; S $explicit^foo();", "auto bar() { return ^foo(); }");
125 testWalk("struct $explicit^S {};", "^S *y;");
126 testWalk("enum $explicit^E {};", "^E *y;");
127 testWalk("struct $explicit^S { static int x; };", "int y = ^S::x;");
128 // One explicit call from the TypeLoc in constructor spelling, another
130 testWalk("struct $explicit^$implicit^S { static int x; };", "auto y = ^S();");
134 // Explicit instantiation and (partial) specialization references primary
136 EXPECT_THAT(testWalk("template<typename> struct $explicit^Foo{};",
139 EXPECT_THAT(testWalk("template<typename> struct $explicit^Foo{};",
142 EXPECT_THAT(testWalk("template<typename> struct $explicit^Foo{};",
148 testWalk("template<typename> struct $explicit^Foo;", "^Foo<int> x();"),
151 testWalk("template<typename> struct $explicit^Foo {};", "^Foo<int> x;"),
155 template<> struct $explicit^Foo<int> {};)cpp",
160 template<typename T> struct $explicit^Foo<T*> {};)cpp",
165 template<typename> struct $explicit^Foo;
170 template<typename> struct $explicit^Foo {};
177 template<typename T> struct $explicit^Foo { Foo(T); };
183 // Explicit instantiation and (partial) specialization references primary
185 // FIXME: Explicit instantiations has wrong source location, they point at the
190 EXPECT_THAT(testWalk("template<typename T> T $explicit^Foo = 0;",
193 EXPECT_THAT(testWalk("template<typename T> T $explicit^Foo = 0;",
201 template <typename T> T $explicit^Foo = 0;)cpp",
206 template<> int $explicit^Foo<int> = 1;)cpp",
210 // explicit partial specializaiton pattern.
213 template<typename T> T* $explicit^Foo<T*> = nullptr;)cpp",
216 // Implicit specializations through explicit instantiations has source
219 template<typename T> T $explicit^Foo = 0;
225 // Explicit instantiation and (partial) specialization references primary
227 // FIXME: Explicit instantiations has wrong source location, they point at the
232 EXPECT_THAT(testWalk("template<typename T> void $explicit^foo(T);",
238 template <typename T> void $explicit^foo() {})cpp",
243 template<> void $explicit^foo<int>(){})cpp",
246 // The decl is actually the specialization, but explicit instantations point
249 template<typename T> void $explicit^foo() {};
258 template<class T> class $explicit^Z {}; // primary template
268 template<class T> T $explicit^foo; // primary template
287 using ns::$explicit^x;
290 testWalk("using $explicit^foo = int;", "^foo x;");
291 testWalk("struct S {}; using $explicit^foo = S;", "^foo x;");
295 namespace ns { using ::$explicit^Foo; })cpp",
300 template<> struct ns::$explicit^Foo<int> {};)cpp",
308 namespace ns { using ::$explicit^Foo; }
317 using ns::foo::$explicit^bar;)cpp",
325 void $explicit^x(); void $ambiguous^x(int); void $ambiguous^x(char);
333 testWalk("namespace ns { struct S; } using ns::$explicit^S;", "^S *s;");
338 class $explicit^Y {};
343 class $explicit^Y {};
351 using ns::$explicit^Y;)cpp",
353 testWalk("namespace ns { enum E {A}; } using enum ns::$explicit^E;",
362 testWalk("template<typename> struct $explicit^S {};", "^S<int> s;");
367 template <typename T> $explicit^using foo = S<T>;)cpp",
371 using ns::$explicit^S;)cpp",
378 using ns::$explicit^S;)cpp",
380 testWalk("template<typename> struct $explicit^S {};",
384 testWalk("template<typename T> struct $explicit^S { S(T); };", "^S s(42);");
506 testWalk("extern int $explicit^x;", "int ^x = 1;");
512 testWalk("void $explicit^foo();", "void ^foo() {}");
514 testWalk("template <typename> void $explicit^foo();",
523 testWalk("enum E { $explicit^A = 42 };", "int e = ^A;");
524 testWalk("enum class $explicit^E : int;", "enum class ^E : int {};");
526 testWalk("namespace ns { enum E { $explicit^A = 42 }; }", "int e = ns::^A;");
527 testWalk("namespace ns { enum E { A = 42 }; } using ns::E::$explicit^A;",
529 testWalk("namespace ns { enum E { A = 42 }; } using enum ns::$explicit^E;",
537 testWalk(R"(namespace ns { enum E { $explicit^A = 42 }; })",
539 testWalk(R"(enum E { $explicit^A = 42 };)", "int e = ::^A;");
553 std::string Concept = "template<typename T> concept $explicit^Foo = true;";
563 testWalk("void $explicit^foo();", "struct Bar { friend void ^foo(); };");
564 testWalk("struct $explicit^Foo {};", "struct Bar { friend struct ^Foo; };");