summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeCompletion/function-overloads.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2018-12-11 16:53:25 +0000
committerEric Fiselier <eric@efcs.ca>2018-12-11 16:53:25 +0000
commit743ae6045d41318149bc8d1bdaf8ce4f48792c90 (patch)
tree466f7134f6a3c62e50efbdcdea8b8b3cb383ac63 /clang/test/CodeCompletion/function-overloads.cpp
parentc5c28ff4ae7dfb615a6f064444e682dee145b459 (diff)
downloadbcm5719-llvm-743ae6045d41318149bc8d1bdaf8ce4f48792c90.tar.gz
bcm5719-llvm-743ae6045d41318149bc8d1bdaf8ce4f48792c90.zip
Pass PartialOverloading argument to the correct corresponding parameter
llvm-svn: 348864
Diffstat (limited to 'clang/test/CodeCompletion/function-overloads.cpp')
-rw-r--r--clang/test/CodeCompletion/function-overloads.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CodeCompletion/function-overloads.cpp b/clang/test/CodeCompletion/function-overloads.cpp
index 00998b02288..11c864c2810 100644
--- a/clang/test/CodeCompletion/function-overloads.cpp
+++ b/clang/test/CodeCompletion/function-overloads.cpp
@@ -10,12 +10,27 @@ void test() {
A a(f(1, 2, 3, 4), 2, 3);
}
+
+namespace NS {
+ struct X { };
+ struct Y { Y(X); };
+ template <class T = int>
+ void g(X, Y);
+}
+
+void test_adl() {
+ NS::X x;
+ g(x, x);
+}
+
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:10:9 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:10:10 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:10:17 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:10:19 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:10:20 %s -o - | FileCheck -check-prefix=CHECK-CC3 %s
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:10:21 %s -o - | FileCheck -check-prefix=CHECK-CC4 %s
+// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:23:7 %s -o - | \
+// RUN: FileCheck -check-prefix=CHECK-CC5 %s
// CHECK-CC1: OVERLOAD: [#int#]f(<#float x#>, float y)
// CHECK-CC1: OVERLOAD: [#int#]f(<#int i#>)
// CHECK-CC1-NOT, CHECK-CC2-NOT: OVERLOAD: A(
@@ -25,3 +40,4 @@ void test() {
// CHECK-CC3: OVERLOAD: A(<#const A &#>)
// CHECK-CC3: OVERLOAD: A(<#A &&#>)
// CHECK-CC4: OVERLOAD: A(int, <#int#>, int)
+// CHECK-CC5: OVERLOAD: [#void#]g(X, <#Y#>)
OpenPOWER on IntegriCloud