[Clang] replace 'bitfield' with 'bit-field' for consistency (#117881)
[llvm-project.git] / clang / test / CodeCompletion / deuglify.cpp
blobf4d8d8876ebf92d8de001b6e4f08cacbb1400cd0
1 // Fake standard library with uglified names.
2 // Parameters (including template params) get ugliness stripped.
3 namespace std {
5 template <typename _Tp>
6 class __vector_base {};
8 template <typename _Tp>
9 class vector : private __vector_base<_Tp> {
10 public:
11 _Tp &at(unsigned __index) const;
12 int __stays_ugly();
15 } // namespace std
17 int 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 %s
19 // 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 %s
22 // 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 %s
25 // CHECK-CC3: OVERLOAD: [#int &#]at(<#unsigned int index#>)