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
Loading
Please sign in to comment