[cfe-dev] bool type is represented as "_Bool" in the AST

Aaron Ballman via cfe-dev cfe-dev at lists.llvm.org
Tue Jul 23 08:01:57 PDT 2019

On Tue, Jul 23, 2019 at 10:47 AM Pradeep Kumar via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> Dear Clang-developer community,
>     I am using libTooling to query information about the source. While querying the string representation of the bool type, I get "_Bool" string. I got the string from QualType::getAsString(). Should I be using another function to query the actual type or is it an expected behavior?
>     I don't get _Bool when dumping the ast except when I dump the QualType Node.

The PrintingPolicy::Bool member dictates this behavior.


> clang Version: 9.0
> LLVM Version: 9.0
> Regards,
> Pradeep
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

More information about the cfe-dev mailing list