LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n);
I think C::B's code completion parser failed to parse this above line as a function declaration.
So, it is a bug.
FYI
I see the parser in https://github.com/JoshDreamland/JustDefineIt can parse those code:
// my_class.h
#define LUA_API
typedef int lua_State;
typedef int lua_Number;
namespace N
{
class my_class
{
public:
void do_something();
LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n);
};
}
Here is the log of the result when running the demo project of JustDefineIt.
Created blank file for preprocessing.
Polling GCC for include directories for c++03...
- Command: gcc -E -x c++ --std=c++03 -v C:\Users\someuser\AppData\Local\Temp\jdi\bla
nk > C:\Users\someuser\AppData\Local\Temp\jdi\search_dirs.txt 2>&1
- Command succeeded. System include paths:
- F:/msys64-20200924/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../
../../include/c++/10.2.0
- F:/msys64-20200924/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../
../../include/c++/10.2.0/x86_64-w64-mingw32
- F:/msys64-20200924/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../
../../include/c++/10.2.0/backward
- F:/msys64-20200924/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/includ
e
- F:/msys64-20200924/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../
../../include
- F:/msys64-20200924/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/includ
e-fixed
- F:/msys64-20200924/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../
../../x86_64-w64-mingw32/include
Obtaining GCC defines list via command line: cpp -dM -x c++ --std=c++03 -E C:\Us
ers\someuser\AppData\Local\Temp\jdi\blank > C:\Users\someuser\AppData\Local\Temp\jdi\defin
es.cc
Command succeeded. Reading in GCC definitions.Beginning parse of file `"test.h"`
...
====[++++++++++++++++++++++++++++++ SUCCESS! ++++++++++++++++++++++++++++++]====
Parse completed with 0 errors and 0 warnings.
Commands are single-letter; 'h' for help.
Follow commands with ENTER on non-unix.
> d ::
Enter the item to define:
>> {
typedef int lua_State;
typedef int lua_Number;
namespace N {
class my_class
{
void do_something();
void lua_pushnumber(lua_State *L, lua_Number n);
}
}
}
>
Note that when I run the command "d ::", it can print the tree correctly.