[llvm-branch-commits] [lldb] 6face91 - [lldb][import-std-module] Add a test for typedef'd std types
Raphael Isemann via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Dec 8 04:41:56 PST 2020
Author: Raphael Isemann
Date: 2020-12-08T13:36:13+01:00
New Revision: 6face9119c811e06cfb284755953ba6cdbdaa22b
URL: https://github.com/llvm/llvm-project/commit/6face9119c811e06cfb284755953ba6cdbdaa22b
DIFF: https://github.com/llvm/llvm-project/commit/6face9119c811e06cfb284755953ba6cdbdaa22b.diff
LOG: [lldb][import-std-module] Add a test for typedef'd std types
Added:
Modified:
lldb/test/API/commands/expression/import-std-module/vector/TestVectorFromStdModule.py
lldb/test/API/commands/expression/import-std-module/vector/main.cpp
Removed:
################################################################################
diff --git a/lldb/test/API/commands/expression/import-std-module/vector/TestVectorFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/vector/TestVectorFromStdModule.py
index 9a186e7a2243..a03c347a728f 100644
--- a/lldb/test/API/commands/expression/import-std-module/vector/TestVectorFromStdModule.py
+++ b/lldb/test/API/commands/expression/import-std-module/vector/TestVectorFromStdModule.py
@@ -87,3 +87,13 @@ def test(self):
ValueCheck(value="4"),
ValueCheck(value="5")
])
+
+ # Test that the typedef'd vector type can be substituted.
+ self.expect("expr b.emplace_back(6)")
+ self.expect_expr("b", result_type="vector_long",
+ result_children=[
+ ValueCheck(value="3"),
+ ValueCheck(value="1"),
+ ValueCheck(value="2"),
+ ValueCheck(value="6"),
+ ])
diff --git a/lldb/test/API/commands/expression/import-std-module/vector/main.cpp b/lldb/test/API/commands/expression/import-std-module/vector/main.cpp
index edf130d47488..668b59181d42 100644
--- a/lldb/test/API/commands/expression/import-std-module/vector/main.cpp
+++ b/lldb/test/API/commands/expression/import-std-module/vector/main.cpp
@@ -1,6 +1,8 @@
#include <vector>
+typedef std::vector<long> vector_long;
int main(int argc, char **argv) {
std::vector<int> a = {3, 1, 2};
+ vector_long b = {3, 1, 2};
return 0; // Set break point at this line.
}
More information about the llvm-branch-commits
mailing list