<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Sep 19, 2011, at 6:51 PM, Anna Zaks wrote:</div><div><br></div><div><blockquote type="cite">class PathDiagnosticLocation {<br>@@ -93,24 +96,36 @@<br> const Decl *D;<br> const SourceManager *SM;<br> const LocationContext *LC;</blockquote><br></div><div>Hi Anna,</div><div><br></div><div>Is LC still needed?</div><div><br></div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">+PathDiagnosticLocation::PathDiagnosticLocation(const Stmt *s,<br>+ const SourceManager &sm,<br>+ const LocationContext *lc)<br>+ : K(StmtK), S(s), D(0), SM(&sm), LC(lc)<br>+{<br>+ const ParentMap* PM = 0;<br>+ if (lc)<br>+ PM = &lc->getParentMap();<br>+<br>+ Loc = genLocation(PM);<br>+ Range = genRange(PM);<br>+}<br>+</span></blockquote></div><div><br></div><div>We should only generate the ParentMap if it is needed by genLocation() and genRange().</div><div><br></div><div>Cheers,</div><div>Ted</div></body></html>