On Sep 19, 2011, at 6:51 PM, Anna Zaks wrote:

> class PathDiagnosticLocation {
> @@ -93,24 +96,36 @@
>   const Decl *D;
>   const SourceManager *SM;
>   const LocationContext *LC;

Hi Anna,

Is LC still needed?


> +PathDiagnosticLocation::PathDiagnosticLocation(const Stmt *s,
> +                                               const SourceManager &sm,
> +                                               const LocationContext *lc)
> +  : K(StmtK), S(s), D(0), SM(&sm), LC(lc)
> +{
> +  const ParentMap* PM = 0;
> +  if (lc)
> +    PM = &lc->getParentMap();
> +
> +  Loc = genLocation(PM);
> +  Range = genRange(PM);
> +}
> +


We should only generate the ParentMap if it is needed by genLocation() and 
genRange().

Cheers,
Ted
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to