[Lldb-commits] [PATCH] D136935: [lldb][CPlusPlus] Introduce CPlusPlusLanguage::MethodName::GetReturnType

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 28 08:12:23 PDT 2022


labath added a comment.

The return type handling for function pointers is not correct. If it's hard to do, then maybe we could skip it (i suspect the original code didn't handle that either), but I have a feeling it might not be that hard, given that we're already able correctly extract the innermost argument types.



================
Comment at: lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp:85
       // Function pointers
-      {"string (*f(vector<int>&&))(float)", "", "f", "(vector<int>&&)", "",
-       "f"},
-      {"void (*&std::_Any_data::_M_access<void (*)()>())()", "std::_Any_data",
-       "_M_access<void (*)()>", "()", "",
+      {"string (*f(vector<int>&&))(float)", "string", "", "f",
+       "(vector<int>&&)", "", "f"},
----------------
I believe the return type here should be something like `string (*)(float)` (a pointer to a function that takes a float and returns a string).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136935



More information about the lldb-commits mailing list