brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · f4d8d88 Raw
26 lines · cpp
1// Fake standard library with uglified names.2// Parameters (including template params) get ugliness stripped.3namespace std {4 5template <typename _Tp>6class __vector_base {};7 8template <typename _Tp>9class vector : private __vector_base<_Tp> {10public:11  _Tp &at(unsigned __index) const;12  int __stays_ugly();13};14 15} // namespace std16 17int x = std::vector<int>{}.at(42);18// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):14 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s19// CHECK-CC1: COMPLETION: __vector_base : __vector_base<<#typename Tp#>>20// CHECK-CC1: COMPLETION: vector : vector<<#typename Tp#>>21// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-4):28 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s22// CHECK-CC2: COMPLETION: __stays_ugly : [#int#]__stays_ugly()23// CHECK-CC2: COMPLETION: at : [#int &#]at(<#unsigned int index#>)[# const#]24// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-7):31 %s -o - | FileCheck -check-prefix=CHECK-CC3 %s25// CHECK-CC3: OVERLOAD: [#int &#]at(<#unsigned int index#>)26