<div dir="ltr">Dear Aaron,<div> How do I set it from command line? I am remeber setting the language standard as -std=c++17 in the clangTool.</div><div><br></div><div>Regards,</div><div>Pradeep</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 23, 2019 at 8:48 PM Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Jul 23, 2019 at 11:12 AM Pradeep Kumar <<a href="mailto:pradeepisro49@gmail.com" target="_blank">pradeepisro49@gmail.com</a>> wrote:<br>
><br>
> Dear Aaron,<br>
> Why is it set to "_Bool" by default?<br>
<br>
It seems to get its default value from LangOptions::Bool, which I<br>
believe is set automatically by the language standard mode.<br>
<br>
> How do I change it?<br>
<br>
Usually you do this by making a copy of an existing PrintingPolicy<br>
object and modifying it.<br>
<br>
PrintingPolicy PP(WhateverPrintingPolicyYouWereUsing);<br>
PP.Bool = 1;<br>
<br>
Then pass PP into the call to getAsString().<br>
<br>
~Aaron<br>
<br>
><br>
> Regards,<br>
> Pradeep<br>
><br>
> On Tue, Jul 23, 2019 at 8:32 PM Aaron Ballman <<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>> wrote:<br>
>><br>
>> On Tue, Jul 23, 2019 at 10:47 AM Pradeep Kumar via cfe-dev<br>
>> <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>
>> ><br>
>> > Dear Clang-developer community,<br>
>> > 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?<br>
>> ><br>
>> > I don't get _Bool when dumping the ast except when I dump the QualType Node.<br>
>><br>
>> The PrintingPolicy::Bool member dictates this behavior.<br>
>><br>
>> ~Aaron<br>
>><br>
>> ><br>
>> > clang Version: 9.0<br>
>> > LLVM Version: 9.0<br>
>> ><br>
>> > Regards,<br>
>> > Pradeep<br>
>> > _______________________________________________<br>
>> > cfe-dev mailing list<br>
>> > <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
>> > <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>