[cfe-dev] convert conditional expression to string

Alexey Sidorin via cfe-dev cfe-dev at lists.llvm.org
Sat Dec 1 22:15:48 PST 2018


Hi Kihong,
The problem in your particular case is that the begin location of 
integer literal is reported as the end location (should we fix it in AST)?
As a workaround, you can try to use Lexer::getLocForEndOfToken() to get 
the token end location for the location reported by getLocEnd().

02.12.2018 8:36, Kihong Heo via cfe-dev пишет:
> Hi all,
>
> How can I get string representations of conditional expressions of IfStmt?
> The problem is as follows:
> For example;
> =============
> /* source code */
> if( x < 10) …
> =============
>
> “IS->getCond()->getSourceRange()” represents only “x <“. It seems quite strange.
>
> Thanks,
> Kihong
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list