diff options
author | Christopher Ferris <cferris@google.com> | 2018-10-25 19:41:45 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2018-10-26 22:42:26 +0000 |
commit | f2484aaed779c0ef03661d6d473ee64e3b0503cd (patch) | |
tree | bc6f0851c48e30bce36d872f7b390de8a01ddcc3 /libc/malloc_hooks/tests/malloc_hooks_tests.cpp | |
parent | c89a3971e94c30611c885e4c440eae2fd9937948 (diff) |
Fix handling of #elif.
When a construct like:
if defined(something)
blocks1
elif 1
blocks2
else
blocks3
endif
The parser would put the first clause but then simply omit the elif and
put all of blocks2 without a terminating #endif. The code also did
something similar when the #else was an #endif.
Also convert all of the unit tests to real unit tests and only run
them if you run cpp.py by itself. Added new unit tests to cover the
new cases.
Test: Ran cpp.py unit tests.
Test: Reran update_all.py and verified nothing changed, and that running
Test: it on the new kernel headers that exposed this problem.
Change-Id: Ie168511303c4e15afdb60c37baef75a966ca29a8
Diffstat (limited to 'libc/malloc_hooks/tests/malloc_hooks_tests.cpp')
0 files changed, 0 insertions, 0 deletions