<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Nov 14, 2013, at 2:37 , edward jiamu <<a href="mailto:edwardjiamu@gmail.com">edwardjiamu@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Thank you for your advice very much.<br><br>At last the problem is solved by this way:<br>1) record the "VarDecl* p" of global variable in the checkASTDecl<br>2) get the SymbolRef by recorded "VarDecl* p" in the evalCall<br> SVal sv = state->getLValue(p, C.getLocationContext());<br> const SymbolRef symRef = sv.getAsSymbol();<br><br>Do this to get the unique id of global variables and local variables.<br></blockquote></div><br><div>VarDecls are never symbolic, so symRef will always be null. Unless I’m forgetting something? The <i>contents</i> will be symbolic, but you only asked for the lvalue (the location).</div><div><br></div><div>Jordan</div></body></html>