File tree Expand file tree Collapse file tree 6 files changed +29
-1
lines changed
lldb/test/API/commands/expression/completion Expand file tree Collapse file tree 6 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -700,6 +700,10 @@ ResultBuilder::ShadowMapEntry::end() const {
700
700
// Filter out names reserved for the implementation if they come from a
701
701
// system header.
702
702
static bool shouldIgnoreDueToReservedName (const NamedDecl *ND, Sema &SemaRef) {
703
+ // Debuggers want access to all identifiers, including reserved ones.
704
+ if (SemaRef.getLangOpts ().DebuggerSupport )
705
+ return false ;
706
+
703
707
ReservedIdentifierStatus Status = ND->isReserved (SemaRef.getLangOpts ());
704
708
// Ignore reserved names for compiler provided decls.
705
709
if (isReservedInAllContexts (Status) && ND->getLocation ().isInvalid ())
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ typedef struct t _TYPEDEF;
5
5
void foo () {
6
6
int y ;
7
7
// RUN: %clang_cc1 -isystem %S/Inputs -fsyntax-only -code-completion-at=%s:%(line-1):9 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
8
+ // CHECK-CC1-NOT: __builtin_va_list
8
9
// CHECK-CC1-NOT: __INTEGER_TYPE
9
10
// CHECK-CC1: _Imaginary
10
11
// CHECK-CC1: _MyPrivateType
@@ -15,4 +16,8 @@ void foo() {
15
16
// CHECK-CC1: y
16
17
17
18
// PR8744
18
- // RUN: %clang_cc1 -isystem %S/Inputs -fsyntax-only -code-completion-at=%s:%(line-17):11 %s
19
+ // RUN: %clang_cc1 -isystem %S/Inputs -fsyntax-only -code-completion-at=%s:%(line-18):11 %s
20
+
21
+ // RUN: %clang_cc1 -isystem %S/Inputs -fsyntax-only -fdebugger-support -code-completion-at=%s:%(line-15):9 %s -o - | FileCheck -check-prefix=CHECK-DBG %s
22
+ // CHECK-DBG: __builtin_va_list
23
+ // CHECK-DBG: __INTEGER_TYPE
Original file line number Diff line number Diff line change 1
1
CXX_SOURCES := main.cpp other.cpp
2
+ CXXFLAGS += -isystem $(SRCDIR ) /sys
2
3
3
4
include Makefile.rules
Original file line number Diff line number Diff line change @@ -246,6 +246,11 @@ def test_expr_completion(self):
246
246
"expr some_expr.Self(). FooNoArgs" , "expr some_expr.Self(). FooNoArgsBar()"
247
247
)
248
248
249
+ self .complete_from_to ("expr myVec.__f" , "expr myVec.__func()" )
250
+ self .complete_from_to ("expr myVec._F" , "expr myVec._Func()" )
251
+ self .complete_from_to ("expr myVec.__m" , "expr myVec.__mem" )
252
+ self .complete_from_to ("expr myVec._M" , "expr myVec._Mem" )
253
+
249
254
def test_expr_completion_with_descriptions (self ):
250
255
self .build ()
251
256
self .main_source = "main.cpp"
Original file line number Diff line number Diff line change
1
+ #include < reserved.h>
2
+
1
3
namespace LongNamespaceName { class NestedClass { long m; }; }
2
4
3
5
// Defined in other.cpp, we only have a forward declaration here.
@@ -31,5 +33,8 @@ int main()
31
33
some_expr.FooNumbersBar1 ();
32
34
Expr::StaticMemberMethodBar ();
33
35
ForwardDecl *fwd_decl_ptr = &fwd_decl;
36
+ MyVec myVec;
37
+ myVec.__func ();
38
+ myVec._Func ();
34
39
return 0 ; // Break here
35
40
}
Original file line number Diff line number Diff line change
1
+ class MyVec {
2
+ int __mem;
3
+ int _Mem;
4
+
5
+ public:
6
+ void __func () {}
7
+ void _Func () {}
8
+ };
You can’t perform that action at this time.
0 commit comments