mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 11:35:51 -04:00

Summary: Printing policy was not propogated to functiondecls when creating a completion string which resulted in canonical template parameters like `foo<type-parameter-0-0>`. This patch propogates printing policy to those as well. Fixes https://github.com/clangd/clangd/issues/76 Reviewers: ilya-biryukov Subscribers: jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72715
18 lines
627 B
C++
18 lines
627 B
C++
template <typename T>
|
|
struct Foo {};
|
|
template <typename T>
|
|
struct Foo<T *> { Foo(T); };
|
|
|
|
void foo() {
|
|
Foo<int>();
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:7:12 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
|
|
// CHECK-CC1: OVERLOAD: Foo()
|
|
// CHECK-CC1: OVERLOAD: Foo(<#const Foo<int> &#>)
|
|
// CHECK-CC1: OVERLOAD: Foo(<#Foo<int> &&#>
|
|
Foo<int *>(3);
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:12:14 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
|
|
// CHECK-CC2: OVERLOAD: Foo(<#int#>)
|
|
// CHECK-CC2: OVERLOAD: Foo(<#const Foo<int *> &#>)
|
|
// CHECK-CC2: OVERLOAD: Foo(<#Foo<int *> &&#>
|
|
}
|