[Lldb-commits] [lldb] [lldb][NativePDB] Find namespaces that only contain typedefs (PR #233460)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 29 14:48:33 PDT 2026
================
@@ -0,0 +1,44 @@
+# REQUIRES: target-windows
+
+# Test that typedefs are found by name. They are only S_UDT records, not type
+# records, and "ns" isn't the scope of anything but a typedef. Evaluate the
+# expressions first, since looking up the type also creates the namespace.
+# RUN: split-file %s %t
+# RUN: %build --nodefaultlib -o %t.exe -- %t/main.cpp
+# RUN: %lldb -f %t.exe -s \
+# RUN: %t/commands.input 2>&1 | FileCheck %s
+
+#--- main.cpp
+
+struct S {
+ char a[3];
+};
+
+typedef S GlobalTypedef;
+
+namespace ns {
+typedef S NamespaceTypedef;
+} // namespace ns
+
----------------
charles-zablit wrote:
Done, added `outer::inner::NestedTypedef`. Neither outer nor `outer::inner` contains anything but the typedef, so both lookups go through `m_typedef_scopes`.
https://github.com/llvm/llvm-project/pull/233460
More information about the lldb-commits
mailing list