<html><head></head><body><div class="ydp2e9e0763yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
        <div><span style="color: rgb(38, 40, 42);">Hi All,</span><br></div></div><div id="ydp17fee07eyahoo_quoted_2599656684" class="ydp17fee07eyahoo_quoted"><div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"><div><div id="ydp17fee07eymsg55761" class="ydp17fee07eymsg3660205089"><br>I need a support to find the below *IL  null pointer return for negative<br>integer numbers.<br><br>const Expr *e = vDecl->getInit();<br>auto *IL = dyn_cast<IntegerLiteral>(e);<br><br>if(IL !=NULL)<br>{<br>    double val = IL->getValue().signedRoundToDouble();<br>    cout << "val:" val;<br>}<br><br>test function:<br><br>main()<br>{<br>    int val = 100;  (int val = -100;)<br>    printf("%d", val);<br>}<br><br><br>if the local variable is positive ex: int var 100;  then cout prints the<br>right value "100".<br>But if the local variable is negative ex: int var -100;  then IL becomes<br>NULL and the cout is skipped.<br><br>Please help me root cause this issue.<br><br>Thanks,<br>Devendran.<br><br><br><br>--<br>Sent from: <a href="http://clang-developers.42468.n3.nabble.com/" rel="nofollow" target="_blank">http://clang-developers.42468.n3.nabble.com/</a><br><br></div></div>
            </div>
        </div></body></html>