[cfe-dev] Allowing checkers to mark symbols as live

Ted Kremenek kremenek at apple.com
Wed Aug 11 18:48:22 PDT 2010


On Aug 11, 2010, at 6:04 PM, Zhongxing Xu wrote:

>>  for (CStringLength::EntryMap::iterator I = Entries.begin(), E = Entries.end();
>>       I != E; ++I) {
>>    if (const SymbolRef *Sym = Len.getAsSymbol())
>>      SR.markInUse(Sym);
>> 
>> and then let SymbolManager decide if it needs to do anything special for the SymbolRef passed to 'markInUse'.  That seems cleaner from an API perspective, as it leaves SymbolReaper in the business of deciding when a symbol is live (and how it decides when it is live).  In other words, just move the dyn_cast<SymbolMetadata> to markInUse.
> 
> Would this over generalize this API or generalize this API too early?

Possibly.  I'm fine with leaving it as it is and then re-evaluating later.



More information about the cfe-dev mailing list