Closed Ronoman closed 1 year ago
Simplified test cases.
This source file will cause Cobra to hang:
#ifdef SOME_VAR
#define SOME_OTHER_VAR 5
#endif
int main(int argc, char *argv[]) {}
while this source file will be processed fine:
#ifdef SOME_VAR
#endif
int main(int argc, char *argv[]) {}
darn -- will look into it
fixed -- it was a mistake in the implementation of rule A5_1_1 thanks for reporting this
Setup
Create a file named
test_code.cpp
(or something similar) with the following contents:This is obviously nonsense code, but it reproduces these issues for me.
Execution
Run
/path/to/cobra -C++ -comments -json -f C++/autosar /path/to/test_code.cpp
, replacing/path/to
with the real absolute paths to the cobra binary and test_code.cpp files, respectively.Expected result
Cobra outputs some issues to stdout, and reports them in various output files.
Actual result
The execution of the cobra binary hangs indefinitely.