brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1023 B · 370cf5e Raw
19 lines · cpp
1template <typename T, typename... Args>2void fun(T x, Args... args) {}3 4void f() {5  fun(1, 2, 3, 4);6  // The results are quite awkward here, but it's the best we can do for now.7  // Tools, including clangd, can unexpand "args" when showing this to the user.8  // The important thing is that we provide OVERLOAD signature in all those cases.9  //10  // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-5):7 %s -o - | FileCheck --check-prefix=CHECK-1 %s11  // CHECK-1: OVERLOAD: [#void#]fun(<#T x#>)12  // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-7):10 %s -o - | FileCheck --check-prefix=CHECK-2 %s13  // CHECK-2: OVERLOAD: [#void#]fun(int x)14  // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-9):13 %s -o - | FileCheck --check-prefix=CHECK-3 %s15  // CHECK-3: OVERLOAD: [#void#]fun(int x, int args)16  // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-11):16 %s -o - | FileCheck --check-prefix=CHECK-4 %s17  // CHECK-4: OVERLOAD: [#void#]fun(int x, int args, int args)18}19