Import Cobalt 19.master.0.203780
Includes the following patches:
https://cobalt-review.googlesource.com/c/cobalt/+/5210
by errong.leng@samsung.com
https://cobalt-review.googlesource.com/c/cobalt/+/5270
by linus.wang@samsung.com
diff --git a/src/third_party/llvm-project/clang/test/CodeCompletion/function-templates.cpp b/src/third_party/llvm-project/clang/test/CodeCompletion/function-templates.cpp
new file mode 100644
index 0000000..cdbbf75
--- /dev/null
+++ b/src/third_party/llvm-project/clang/test/CodeCompletion/function-templates.cpp
@@ -0,0 +1,23 @@
+namespace std {
+ template<typename RandomAccessIterator>
+ void sort(RandomAccessIterator first, RandomAccessIterator last);
+
+ template<class X, class Y>
+ X* dyn_cast(Y *Val);
+}
+
+class Foo {
+public:
+ template<typename T> T &getAs();
+};
+
+void f() {
+ std::sort(1, 2);
+ Foo().getAs<int>();
+ // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:15:8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
+ // CHECK-CC1: dyn_cast<<#class X#>>(<#Y *Val#>)
+ // CHECK-CC1: sort(<#RandomAccessIterator first#>, <#RandomAccessIterator last#>
+ // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:16:9 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
+ // CHECK-CC2: getAs<<#typename T#>>()
+)
+