-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parser error during marco resolving #705
Comments
Please use the sslr toolkit to reduce the problem/example: https://github.com/SonarOpenCommunity/sonar-cxx/releases/download/cxx-0.9.4/sslr-cxx-toolkit-0.9.4.jar Remove all parts not needed to reproduce it, e.g.: #define declare_method_process(handle, name, func) \
{ \
int handle = f(name, SC_MAKE_FUNC_PTR(func)); \
}
#define SC_METHOD(func) \
declare_method_process( func ## _handle, \
#func, \
func ) |
I'm very sorry but I'm not a SonarQube Admin and it is not possible to remove anything from the define statements. I'm also not sure how to use this sslr toolkit. I tried to reproduce the behaviour with different modifications of the define statements. It seems that the **"::"**sc_core:: ... which is necessary to be sure that it is referenced to the global namespace causes the parser crash This seems to be related to #526 |
reproducible with this: #define SC_METHOD(func) declare_method_process( func ## _handle, #func, func )
SC_METHOD(test); Problem is the |
#define SC_METHOD(func) declare_method_process( func ## _handle, #func, func ) SC_METHOD(test); // declare_method_process( test_handle, "test", test ); close #705
I'm using your plug-in to parse SystemC source code. Which is fully compliant to the C++ standard.
The following source code leads to an parser error.
First file:
SC_METHOD(sc_method1);
The SystemC macro SC_METHD is defined in sc_modules.h which looks like this:
If I paste the resolved macro directly in my source file, everything works fine.
If I use the SC_METHOD macro i get an error.
My SonarQube version is: 4.5.6
My Plubin version is: 0.9.4
The text was updated successfully, but these errors were encountered: