[Lldb-commits] [PATCH] D140240: [lldb] Prevent false positives with simple template names in SymbolFileDWARF::FindTypes

Michael Buch via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 19 14:43:52 PST 2022


Michael137 added inline comments.


================
Comment at: lldb/test/API/lang/cpp/unique-types4/TestUniqueTypes4.py:15
+        lldbutil.run_to_source_breakpoint(self, "// Set breakpoint here", lldb.SBFileSpec("main.cpp"))
+        # FIXME: these should successfully print the values
+        self.expect("print ns::Foo<double>::value", substrs=["no member named"], error=True)
----------------
aeubanks wrote:
> this makes handling of -gsimple-template-names the same as the current handling of -gno-simple-template-names
> 
> I haven't dug too deep into the existing difference between `FooDouble`/`FooInt` vs the others
> 
> for the "no member named" errors, I believe clang is attempting to get the uninstantiated declarations of `Foo`/`Bar`, which the dwarf knows nothing about
Yup that's exactly what it is. For `expr Foo<double>`, `clang::Sema`'s template lookup would ask LLDB to give it type `Foo`, but we can't service that request from DWARF currently


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140240/new/

https://reviews.llvm.org/D140240



More information about the lldb-commits mailing list