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

Will Hawkins via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 28 14:13:06 PDT 2022


hawkinsw added inline comments.


================
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"},
----------------
labath wrote:
> 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).
I read this "nice" function pointer declaration as:

declare `f` as a function that takes a `vector<int>` by r-value reference that, in turn, returns a pointer to a function taking a `float` by value that returns a `string`. 

Upon writing that out, I realize that I am basically saying the same thing as @labath. Sorry! 


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