[Lldb-commits] [lldb] [lldb][test] TestExprCompletion.py: add tests for completion of reserved identifiers (PR #84890)
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/84890 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][test] TestExprCompletion.py: add tests for completion of reserved identifiers (PR #84890)
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/84890 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][test] TestExprCompletion.py: add tests for completion of reserved identifiers (PR #84890)
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/84890 >From ecb8e2744628207dd0ec72272428e3f57e8d68bb Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 12 Mar 2024 10:04:12 + Subject: [PATCH 1/4] [lldb][test] TestExprCompletion.py: add tests for completion of reserved identifiers --- .../expression/completion/TestExprCompletion.py| 14 ++ .../API/commands/expression/completion/main.cpp| 11 +++ 2 files changed, 25 insertions(+) diff --git a/lldb/test/API/commands/expression/completion/TestExprCompletion.py b/lldb/test/API/commands/expression/completion/TestExprCompletion.py index c6a1e3c0f42275..d322b9c323d1ef 100644 --- a/lldb/test/API/commands/expression/completion/TestExprCompletion.py +++ b/lldb/test/API/commands/expression/completion/TestExprCompletion.py @@ -246,6 +246,20 @@ def test_expr_completion(self): "expr some_expr.Self(). FooNoArgs", "expr some_expr.Self(). FooNoArgsBar()" ) +self.complete_from_to( +"expr myVec.__f", "expr myVec.__func()" +) +self.complete_from_to( +"expr myVec._F", "expr myVec._Func()" +) +self.complete_from_to( +"expr myVec.__m", "expr myVec.__mem" +) +self.complete_from_to( +"expr myVec._M", "expr myVec._Mem" +) + + def test_expr_completion_with_descriptions(self): self.build() self.main_source = "main.cpp" diff --git a/lldb/test/API/commands/expression/completion/main.cpp b/lldb/test/API/commands/expression/completion/main.cpp index 908bebbebff568..b87f9626c93283 100644 --- a/lldb/test/API/commands/expression/completion/main.cpp +++ b/lldb/test/API/commands/expression/completion/main.cpp @@ -1,3 +1,11 @@ +class MyVec { +int __mem; +int _Mem; +public: +void __func() {} +void _Func() {} +}; + namespace LongNamespaceName { class NestedClass { long m; }; } // Defined in other.cpp, we only have a forward declaration here. @@ -31,5 +39,8 @@ int main() some_expr.FooNumbersBar1(); Expr::StaticMemberMethodBar(); ForwardDecl *fwd_decl_ptr = _decl; +MyVec myVec; +myVec.__func(); +myVec._Func(); return 0; // Break here } >From 68364e2c6e20fbe6b57672d2cb4f07d6fcf3f34e Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 12 Mar 2024 10:11:59 + Subject: [PATCH 2/4] fixup! python format --- .../expression/completion/TestExprCompletion.py | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/lldb/test/API/commands/expression/completion/TestExprCompletion.py b/lldb/test/API/commands/expression/completion/TestExprCompletion.py index d322b9c323d1ef..022b9436ee8ea6 100644 --- a/lldb/test/API/commands/expression/completion/TestExprCompletion.py +++ b/lldb/test/API/commands/expression/completion/TestExprCompletion.py @@ -246,19 +246,10 @@ def test_expr_completion(self): "expr some_expr.Self(). FooNoArgs", "expr some_expr.Self(). FooNoArgsBar()" ) -self.complete_from_to( -"expr myVec.__f", "expr myVec.__func()" -) -self.complete_from_to( -"expr myVec._F", "expr myVec._Func()" -) -self.complete_from_to( -"expr myVec.__m", "expr myVec.__mem" -) -self.complete_from_to( -"expr myVec._M", "expr myVec._Mem" -) - +self.complete_from_to("expr myVec.__f", "expr myVec.__func()") +self.complete_from_to("expr myVec._F", "expr myVec._Func()") +self.complete_from_to("expr myVec.__m", "expr myVec.__mem") +self.complete_from_to("expr myVec._M", "expr myVec._Mem") def test_expr_completion_with_descriptions(self): self.build() >From 2961ca8068b2a90999e694ce40f53da80684e5b7 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 12 Mar 2024 10:21:20 + Subject: [PATCH 3/4] fixup! move type into header --- lldb/test/API/commands/expression/completion/Makefile | 1 + lldb/test/API/commands/expression/completion/main.cpp | 8 +--- .../API/commands/expression/completion/sys/reserved.h | 7 +++ 3 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 lldb/test/API/commands/expression/completion/sys/reserved.h diff --git a/lldb/test/API/commands/expression/completion/Makefile b/lldb/test/API/commands/expression/completion/Makefile index 020dce7c31d11d..9882622b2189ea 100644 --- a/lldb/test/API/commands/expression/completion/Makefile +++ b/lldb/test/API/commands/expression/completion/Makefile @@ -1,3 +1,4 @@ CXX_SOURCES := main.cpp other.cpp +CXXFLAGS += -isystem $(SRCDIR)/sys include Makefile.rules diff --git a/lldb/test/API/commands/expression/completion/main.cpp b/lldb/test/API/commands/expression/completion/main.cpp index b87f9626c93283..5e03805a7a4d5c 100644 --- a/lldb/test/API/commands/expression/completion/main.cpp +++
[Lldb-commits] [lldb] [lldb][test] TestExprCompletion.py: add tests for completion of reserved identifiers (PR #84890)
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/84890 >From ecb8e2744628207dd0ec72272428e3f57e8d68bb Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 12 Mar 2024 10:04:12 + Subject: [PATCH 1/3] [lldb][test] TestExprCompletion.py: add tests for completion of reserved identifiers --- .../expression/completion/TestExprCompletion.py| 14 ++ .../API/commands/expression/completion/main.cpp| 11 +++ 2 files changed, 25 insertions(+) diff --git a/lldb/test/API/commands/expression/completion/TestExprCompletion.py b/lldb/test/API/commands/expression/completion/TestExprCompletion.py index c6a1e3c0f42275..d322b9c323d1ef 100644 --- a/lldb/test/API/commands/expression/completion/TestExprCompletion.py +++ b/lldb/test/API/commands/expression/completion/TestExprCompletion.py @@ -246,6 +246,20 @@ def test_expr_completion(self): "expr some_expr.Self(). FooNoArgs", "expr some_expr.Self(). FooNoArgsBar()" ) +self.complete_from_to( +"expr myVec.__f", "expr myVec.__func()" +) +self.complete_from_to( +"expr myVec._F", "expr myVec._Func()" +) +self.complete_from_to( +"expr myVec.__m", "expr myVec.__mem" +) +self.complete_from_to( +"expr myVec._M", "expr myVec._Mem" +) + + def test_expr_completion_with_descriptions(self): self.build() self.main_source = "main.cpp" diff --git a/lldb/test/API/commands/expression/completion/main.cpp b/lldb/test/API/commands/expression/completion/main.cpp index 908bebbebff568..b87f9626c93283 100644 --- a/lldb/test/API/commands/expression/completion/main.cpp +++ b/lldb/test/API/commands/expression/completion/main.cpp @@ -1,3 +1,11 @@ +class MyVec { +int __mem; +int _Mem; +public: +void __func() {} +void _Func() {} +}; + namespace LongNamespaceName { class NestedClass { long m; }; } // Defined in other.cpp, we only have a forward declaration here. @@ -31,5 +39,8 @@ int main() some_expr.FooNumbersBar1(); Expr::StaticMemberMethodBar(); ForwardDecl *fwd_decl_ptr = _decl; +MyVec myVec; +myVec.__func(); +myVec._Func(); return 0; // Break here } >From 68364e2c6e20fbe6b57672d2cb4f07d6fcf3f34e Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 12 Mar 2024 10:11:59 + Subject: [PATCH 2/3] fixup! python format --- .../expression/completion/TestExprCompletion.py | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/lldb/test/API/commands/expression/completion/TestExprCompletion.py b/lldb/test/API/commands/expression/completion/TestExprCompletion.py index d322b9c323d1ef..022b9436ee8ea6 100644 --- a/lldb/test/API/commands/expression/completion/TestExprCompletion.py +++ b/lldb/test/API/commands/expression/completion/TestExprCompletion.py @@ -246,19 +246,10 @@ def test_expr_completion(self): "expr some_expr.Self(). FooNoArgs", "expr some_expr.Self(). FooNoArgsBar()" ) -self.complete_from_to( -"expr myVec.__f", "expr myVec.__func()" -) -self.complete_from_to( -"expr myVec._F", "expr myVec._Func()" -) -self.complete_from_to( -"expr myVec.__m", "expr myVec.__mem" -) -self.complete_from_to( -"expr myVec._M", "expr myVec._Mem" -) - +self.complete_from_to("expr myVec.__f", "expr myVec.__func()") +self.complete_from_to("expr myVec._F", "expr myVec._Func()") +self.complete_from_to("expr myVec.__m", "expr myVec.__mem") +self.complete_from_to("expr myVec._M", "expr myVec._Mem") def test_expr_completion_with_descriptions(self): self.build() >From 2961ca8068b2a90999e694ce40f53da80684e5b7 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 12 Mar 2024 10:21:20 + Subject: [PATCH 3/3] fixup! move type into header --- lldb/test/API/commands/expression/completion/Makefile | 1 + lldb/test/API/commands/expression/completion/main.cpp | 8 +--- .../API/commands/expression/completion/sys/reserved.h | 7 +++ 3 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 lldb/test/API/commands/expression/completion/sys/reserved.h diff --git a/lldb/test/API/commands/expression/completion/Makefile b/lldb/test/API/commands/expression/completion/Makefile index 020dce7c31d11d..9882622b2189ea 100644 --- a/lldb/test/API/commands/expression/completion/Makefile +++ b/lldb/test/API/commands/expression/completion/Makefile @@ -1,3 +1,4 @@ CXX_SOURCES := main.cpp other.cpp +CXXFLAGS += -isystem $(SRCDIR)/sys include Makefile.rules diff --git a/lldb/test/API/commands/expression/completion/main.cpp b/lldb/test/API/commands/expression/completion/main.cpp index b87f9626c93283..5e03805a7a4d5c 100644 --- a/lldb/test/API/commands/expression/completion/main.cpp +++
[Lldb-commits] [lldb] [lldb][test] TestExprCompletion.py: add tests for completion of reserved identifiers (PR #84890)
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/84890 >From ecb8e2744628207dd0ec72272428e3f57e8d68bb Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 12 Mar 2024 10:04:12 + Subject: [PATCH 1/2] [lldb][test] TestExprCompletion.py: add tests for completion of reserved identifiers --- .../expression/completion/TestExprCompletion.py| 14 ++ .../API/commands/expression/completion/main.cpp| 11 +++ 2 files changed, 25 insertions(+) diff --git a/lldb/test/API/commands/expression/completion/TestExprCompletion.py b/lldb/test/API/commands/expression/completion/TestExprCompletion.py index c6a1e3c0f42275..d322b9c323d1ef 100644 --- a/lldb/test/API/commands/expression/completion/TestExprCompletion.py +++ b/lldb/test/API/commands/expression/completion/TestExprCompletion.py @@ -246,6 +246,20 @@ def test_expr_completion(self): "expr some_expr.Self(). FooNoArgs", "expr some_expr.Self(). FooNoArgsBar()" ) +self.complete_from_to( +"expr myVec.__f", "expr myVec.__func()" +) +self.complete_from_to( +"expr myVec._F", "expr myVec._Func()" +) +self.complete_from_to( +"expr myVec.__m", "expr myVec.__mem" +) +self.complete_from_to( +"expr myVec._M", "expr myVec._Mem" +) + + def test_expr_completion_with_descriptions(self): self.build() self.main_source = "main.cpp" diff --git a/lldb/test/API/commands/expression/completion/main.cpp b/lldb/test/API/commands/expression/completion/main.cpp index 908bebbebff568..b87f9626c93283 100644 --- a/lldb/test/API/commands/expression/completion/main.cpp +++ b/lldb/test/API/commands/expression/completion/main.cpp @@ -1,3 +1,11 @@ +class MyVec { +int __mem; +int _Mem; +public: +void __func() {} +void _Func() {} +}; + namespace LongNamespaceName { class NestedClass { long m; }; } // Defined in other.cpp, we only have a forward declaration here. @@ -31,5 +39,8 @@ int main() some_expr.FooNumbersBar1(); Expr::StaticMemberMethodBar(); ForwardDecl *fwd_decl_ptr = _decl; +MyVec myVec; +myVec.__func(); +myVec._Func(); return 0; // Break here } >From 68364e2c6e20fbe6b57672d2cb4f07d6fcf3f34e Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 12 Mar 2024 10:11:59 + Subject: [PATCH 2/2] fixup! python format --- .../expression/completion/TestExprCompletion.py | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/lldb/test/API/commands/expression/completion/TestExprCompletion.py b/lldb/test/API/commands/expression/completion/TestExprCompletion.py index d322b9c323d1ef..022b9436ee8ea6 100644 --- a/lldb/test/API/commands/expression/completion/TestExprCompletion.py +++ b/lldb/test/API/commands/expression/completion/TestExprCompletion.py @@ -246,19 +246,10 @@ def test_expr_completion(self): "expr some_expr.Self(). FooNoArgs", "expr some_expr.Self(). FooNoArgsBar()" ) -self.complete_from_to( -"expr myVec.__f", "expr myVec.__func()" -) -self.complete_from_to( -"expr myVec._F", "expr myVec._Func()" -) -self.complete_from_to( -"expr myVec.__m", "expr myVec.__mem" -) -self.complete_from_to( -"expr myVec._M", "expr myVec._Mem" -) - +self.complete_from_to("expr myVec.__f", "expr myVec.__func()") +self.complete_from_to("expr myVec._F", "expr myVec._Func()") +self.complete_from_to("expr myVec.__m", "expr myVec.__mem") +self.complete_from_to("expr myVec._M", "expr myVec._Mem") def test_expr_completion_with_descriptions(self): self.build() ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][test] TestExprCompletion.py: add tests for completion of reserved identifiers (PR #84890)
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 6c39fa9e9f198498ff7cf9646081437a0fc0882a ecb8e2744628207dd0ec72272428e3f57e8d68bb -- lldb/test/API/commands/expression/completion/main.cpp `` View the diff from clang-format here. ``diff diff --git a/lldb/test/API/commands/expression/completion/main.cpp b/lldb/test/API/commands/expression/completion/main.cpp index b87f9626c9..ecbb226318 100644 --- a/lldb/test/API/commands/expression/completion/main.cpp +++ b/lldb/test/API/commands/expression/completion/main.cpp @@ -1,9 +1,10 @@ class MyVec { -int __mem; -int _Mem; + int __mem; + int _Mem; + public: -void __func() {} -void _Func() {} + void __func() {} + void _Func() {} }; namespace LongNamespaceName { class NestedClass { long m; }; } `` https://github.com/llvm/llvm-project/pull/84890 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][test] TestExprCompletion.py: add tests for completion of reserved identifiers (PR #84890)
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 6c39fa9e9f198498ff7cf9646081437a0fc0882a...ecb8e2744628207dd0ec72272428e3f57e8d68bb lldb/test/API/commands/expression/completion/TestExprCompletion.py `` View the diff from darker here. ``diff --- TestExprCompletion.py 2024-03-12 10:04:12.00 + +++ TestExprCompletion.py 2024-03-12 10:08:45.666282 + @@ -244,23 +244,14 @@ ) self.complete_from_to( "expr some_expr.Self(). FooNoArgs", "expr some_expr.Self(). FooNoArgsBar()" ) -self.complete_from_to( -"expr myVec.__f", "expr myVec.__func()" -) -self.complete_from_to( -"expr myVec._F", "expr myVec._Func()" -) -self.complete_from_to( -"expr myVec.__m", "expr myVec.__mem" -) -self.complete_from_to( -"expr myVec._M", "expr myVec._Mem" -) - +self.complete_from_to("expr myVec.__f", "expr myVec.__func()") +self.complete_from_to("expr myVec._F", "expr myVec._Func()") +self.complete_from_to("expr myVec.__m", "expr myVec.__mem") +self.complete_from_to("expr myVec._M", "expr myVec._Mem") def test_expr_completion_with_descriptions(self): self.build() self.main_source = "main.cpp" self.main_source_spec = lldb.SBFileSpec(self.main_source) `` https://github.com/llvm/llvm-project/pull/84890 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][test] TestExprCompletion.py: add tests for completion of reserved identifiers (PR #84890)
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Michael Buch (Michael137) Changes Depends on https://github.com/llvm/llvm-project/pull/84891 --- Full diff: https://github.com/llvm/llvm-project/pull/84890.diff 2 Files Affected: - (modified) lldb/test/API/commands/expression/completion/TestExprCompletion.py (+14) - (modified) lldb/test/API/commands/expression/completion/main.cpp (+11) ``diff diff --git a/lldb/test/API/commands/expression/completion/TestExprCompletion.py b/lldb/test/API/commands/expression/completion/TestExprCompletion.py index c6a1e3c0f42275..d322b9c323d1ef 100644 --- a/lldb/test/API/commands/expression/completion/TestExprCompletion.py +++ b/lldb/test/API/commands/expression/completion/TestExprCompletion.py @@ -246,6 +246,20 @@ def test_expr_completion(self): "expr some_expr.Self(). FooNoArgs", "expr some_expr.Self(). FooNoArgsBar()" ) +self.complete_from_to( +"expr myVec.__f", "expr myVec.__func()" +) +self.complete_from_to( +"expr myVec._F", "expr myVec._Func()" +) +self.complete_from_to( +"expr myVec.__m", "expr myVec.__mem" +) +self.complete_from_to( +"expr myVec._M", "expr myVec._Mem" +) + + def test_expr_completion_with_descriptions(self): self.build() self.main_source = "main.cpp" diff --git a/lldb/test/API/commands/expression/completion/main.cpp b/lldb/test/API/commands/expression/completion/main.cpp index 908bebbebff568..b87f9626c93283 100644 --- a/lldb/test/API/commands/expression/completion/main.cpp +++ b/lldb/test/API/commands/expression/completion/main.cpp @@ -1,3 +1,11 @@ +class MyVec { +int __mem; +int _Mem; +public: +void __func() {} +void _Func() {} +}; + namespace LongNamespaceName { class NestedClass { long m; }; } // Defined in other.cpp, we only have a forward declaration here. @@ -31,5 +39,8 @@ int main() some_expr.FooNumbersBar1(); Expr::StaticMemberMethodBar(); ForwardDecl *fwd_decl_ptr = _decl; +MyVec myVec; +myVec.__func(); +myVec._Func(); return 0; // Break here } `` https://github.com/llvm/llvm-project/pull/84890 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][test] TestExprCompletion.py: add tests for completion of reserved identifiers (PR #84890)
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/84890 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][test] TestExprCompletion.py: add tests for completion of reserved identifiers (PR #84890)
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/84890 None >From ecb8e2744628207dd0ec72272428e3f57e8d68bb Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 12 Mar 2024 10:04:12 + Subject: [PATCH] [lldb][test] TestExprCompletion.py: add tests for completion of reserved identifiers --- .../expression/completion/TestExprCompletion.py| 14 ++ .../API/commands/expression/completion/main.cpp| 11 +++ 2 files changed, 25 insertions(+) diff --git a/lldb/test/API/commands/expression/completion/TestExprCompletion.py b/lldb/test/API/commands/expression/completion/TestExprCompletion.py index c6a1e3c0f42275..d322b9c323d1ef 100644 --- a/lldb/test/API/commands/expression/completion/TestExprCompletion.py +++ b/lldb/test/API/commands/expression/completion/TestExprCompletion.py @@ -246,6 +246,20 @@ def test_expr_completion(self): "expr some_expr.Self(). FooNoArgs", "expr some_expr.Self(). FooNoArgsBar()" ) +self.complete_from_to( +"expr myVec.__f", "expr myVec.__func()" +) +self.complete_from_to( +"expr myVec._F", "expr myVec._Func()" +) +self.complete_from_to( +"expr myVec.__m", "expr myVec.__mem" +) +self.complete_from_to( +"expr myVec._M", "expr myVec._Mem" +) + + def test_expr_completion_with_descriptions(self): self.build() self.main_source = "main.cpp" diff --git a/lldb/test/API/commands/expression/completion/main.cpp b/lldb/test/API/commands/expression/completion/main.cpp index 908bebbebff568..b87f9626c93283 100644 --- a/lldb/test/API/commands/expression/completion/main.cpp +++ b/lldb/test/API/commands/expression/completion/main.cpp @@ -1,3 +1,11 @@ +class MyVec { +int __mem; +int _Mem; +public: +void __func() {} +void _Func() {} +}; + namespace LongNamespaceName { class NestedClass { long m; }; } // Defined in other.cpp, we only have a forward declaration here. @@ -31,5 +39,8 @@ int main() some_expr.FooNumbersBar1(); Expr::StaticMemberMethodBar(); ForwardDecl *fwd_decl_ptr = _decl; +MyVec myVec; +myVec.__func(); +myVec._Func(); return 0; // Break here } ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits