simplecpp
simplecpp copied to clipboard
some preprocessor directives do not handle comments properly
The test is unconditionally removing all comments (addressed in #506) leading to tests which test the behavior of such not actually testing it since they did not materialize in the token list.
Affected tests:
has_include_2
missingHeader4
It also affects the #line lineno preprocessor handling.
/**/#/**/if/**/0/**/
#error "if"
#endif
#if 0
#error "endif"
#/**/endif
/**/#/**/define/**/DEF_1/**/
#ifndef DEF_1
#error "DEF_1"
#endif
/**/#/**/define/**/DEF_2/**/1/**/
#if !DEF_2
#error "DEF_2"
#endif
#define DEF_3
/**/#/**/if/**/!/**/defined/**/(/**/DEF_3/**/)/**/
#error "DEF_3"
#endif
/**/#/**/3/**/
/**/#/**/3/**/"test.c"/**/
/**/#/**/line/**/3/**/
/**/#/**/line/**/3/**/"test.c"/**/
/**/#/**/pragma/**/once/**/
/**/#/**/include/**/<string>/**/
/**/#/**/include/**/"simplecpp.h"/**/