[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CodeCompletion / ctor-signature.cpp
blob8f0cfacfc11553da9a55e8026302e788e146666b
1 template <typename T>
2 struct Foo {};
3 template <typename T>
4 struct Foo<T *> { Foo(T); };
6 void foo() {
7 Foo<int>();
8 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:7:12 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
9 // CHECK-CC1: OVERLOAD: Foo()
10 // CHECK-CC1: OVERLOAD: Foo(<#const Foo<int> &#>)
11 // CHECK-CC1: OVERLOAD: Foo(<#Foo<int> &&#>
12 Foo<int *>(3);
13 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:12:14 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
14 // CHECK-CC2: OVERLOAD: Foo(<#int#>)
15 // CHECK-CC2: OVERLOAD: Foo(<#const Foo<int *> &#>)
16 // CHECK-CC2: OVERLOAD: Foo(<#Foo<int *> &&#>
19 namespace std {
20 template <typename> struct initializer_list {};
21 } // namespace std
23 struct Bar {
24 // CHECK-BRACED: OVERLOAD: Bar{<#int#>}
25 Bar(int);
26 // CHECK-BRACED: OVERLOAD: Bar{<#double#>, double}
27 Bar(double, double);
28 // FIXME: no support for init-list constructors yet.
29 // CHECK-BRACED-NOT: OVERLOAD: {{.*}}char
30 Bar(std::initializer_list<char> C);
31 // CHECK-BRACED: OVERLOAD: Bar{<#const Bar &#>}
32 // CHECK-BRACED: OVERLOAD: Bar{<#T *Pointer#>}
33 template <typename T> Bar(T *Pointer);
36 auto b1 = Bar{};
37 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:36:15 %s | FileCheck -check-prefix=CHECK-BRACED %s
38 Bar b2{};
39 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:38:8 %s | FileCheck -check-prefix=CHECK-BRACED %s
40 static int consumeBar(Bar) { return 0; }
41 int b3 = consumeBar({});
42 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:41:22 %s | FileCheck -check-prefix=CHECK-BRACED %s
44 struct Aggregate {
45 int first;
46 int second;
47 int third;
50 Aggregate a{1, 2, 3};
51 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:50:13 %s | FileCheck -check-prefix=CHECK-AGGREGATE-1 %s
52 // CHECK-AGGREGATE-1: OVERLOAD: Aggregate{<#int first#>, int second, int third}
53 // CHECK-AGGREGATE-1: OVERLOAD: Aggregate{<#const Aggregate &#>}
54 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:50:16 %s | FileCheck -check-prefix=CHECK-AGGREGATE-2 %s
55 // CHECK-AGGREGATE-2: OVERLOAD: Aggregate{int first, <#int second#>, int third}
56 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:50:18 %s | FileCheck -check-prefix=CHECK-AGGREGATE-3 %s
57 // CHECK-AGGREGATE-3: OVERLOAD: Aggregate{int first, int second, <#int third#>}
59 Aggregate d{.second=1, .first=2, 3, 4, };
60 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:59:13 %s | FileCheck -check-prefix=CHECK-DESIG-1 %s
61 // CHECK-DESIG-1: OVERLOAD: Aggregate{<#int first#>, int second, int third}
62 // CHECK-DESIG-1: OVERLOAD: Aggregate{<#const Aggregate &#>}
63 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:59:24 %s | FileCheck -check-prefix=CHECK-DESIG-2 %s
64 // CHECK-DESIG-2: OVERLOAD: Aggregate{int first, int second, <#int third#>}
65 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:59:34 %s | FileCheck -check-prefix=CHECK-DESIG-3 %s
66 // CHECK-DESIG-3: OVERLOAD: Aggregate{int first, <#int second#>, int third}
67 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:59:37 %s | FileCheck -check-prefix=CHECK-DESIG-4 %s
68 // CHECK-DESIG-4: OVERLOAD: Aggregate{int first, int second, <#int third#>}
69 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:59:38 %s | FileCheck -check-prefix=CHECK-DESIG-5 %s --allow-empty
70 // CHECK-DESIG-5-NOT: OVERLOAD