Re: [lldb-dev] C++ method declaration parsing

2017-03-16 Thread Pavel Labath via lldb-dev
I think clang-format's parser would be a better candidate for code reuse, but even that might be too much, as we don't need that level of detail (basically we just need to split the name into function name, return type and argument list), and we can make a lot of simplifying assumptions here (e.g.

Re: [lldb-dev] C++ method declaration parsing

2017-03-16 Thread Tamas Berghammer via lldb-dev
A random idea: Instead of parsing demangled C++ method names what people think about writing or reusing a demangler what can gave back both the demangled name and the parsed name in some form? My guess is that it would be both more efficient (we already have most of information during demangling)

Re: [lldb-dev] C++ method declaration parsing

2017-03-15 Thread Eugene Zemtsov via lldb-dev
Yes, it's a good idea to add cfe-dev. It is totally possible that I overlooked something and clang can help with this kind of superficial parsing. As far as I can see even clang-format does it's own parsing (UnwrappedLineParser.cpp) and clang-format has very similar need of roughly understanding o

Re: [lldb-dev] C++ method declaration parsing

2017-03-15 Thread Zachary Turner via lldb-dev
If there is any way to re-use clang parser for this, it would be wonderful. Even if it means adding support to clang for whatever you need in order to make it possible. You mention performance, are you certain that clang's parser would be unacceptably slow? +cfe-dev as they may have some more in