Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parser: always convert _Bool to bool
We see _Bool in documentation, because that's the C keyword, and stdbool.h defines bool to _Bool rather than typedefs it. Stop overcomplicating the matter, and just unconditionally convert _Bool to bool. 'bool' is what most people want to see in code and documentation. It should really be that simple. As far as special casing goes, bool is easily special enough. C++ and the new C23 have bool keywords. Previously I thought we should at least check whether the code originally had '_Bool' and preserve that, but now that we have C++ support, GCC and Clang stdbool.h actually also define the reverse (#define _Bool bool) for C++. It gets overly complicated. With the current type fixups in place, the fix is just a few lines of code, and I find it hard to justify adding any more code for this. Fixes #92.
- Loading branch information