2
0
mirror of https://github.com/boostorg/wave.git synced 2026-01-19 04:42:16 +00:00

1 Commits

Author SHA1 Message Date
Jeff Trull
f2957045b5 Fix line directives for ifdef and ifndef when default hooks are used (#140)
At some point in the past the handling for #if and #ifdef diverged. The code that handles emitting a line directive when a conditional section is skipped worked for #if but not ifdef/ifndef.

This problem was not observable when the eat_whitespace hooks were used instead of the default_preprocessing hooks, because the former
signals skipped newlines through the may_skip_whitespace hook, hiding the problem. Furthermore, the majority of Wave tests use the eat_whitespace hooks, so it wasn't visible there.

This change restores ifdef/ifndef to the same section as #if, so any changes to conditional handling will happen uniformly. Also, a test case is added to cover the default hooks and this particular case.
2022-01-02 07:09:32 -08:00