[cfe-dev] Why is canonical type _Bool instead of bool?
Aaron Ballman via cfe-dev
cfe-dev at lists.llvm.org
Wed Oct 14 04:55:19 PDT 2020
On Wed, Oct 14, 2020 at 5:36 AM Ray Zhang via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> When canonicalizing bools, the resulting value is equal to _Bool(which is a C99 thing). The tool I'm developing is turning expressions such as
> (bool) 3.2f;
> Is there some way I can set this to not be the case when parsing C++ files? The closest thing that seemed to make sense was to set language options but I don't see where I can explicitly only support C++.
If you are printing the type out, that behavior is controlled by the
printing policy which get set up from the language options:
> Ray Zhang
> P.S. I'm fairly close to finishing the entire tool and am hoping to contribute it into clang-tools-extra :)
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
More information about the cfe-dev