On Sep 21, 2012, at 8:19 , Sean McBride <[email protected]> wrote:
>> Also, these patches seem to lack tests. Could you provide tests? > > Perhaps... as I said, I was merely perusing the analyzer code out of > curiosity I don't really know my way around clang's codebase. But of course > searching for 'OSCompareAndSwap' found what looks like a test in > tools/clang/test/Analysis/NSString.m.... I don't get the relation to > NSString, but I guess I'll add tests for the others there? Hi, Sean. Both patches look reasonable, though there are a zillion other CompareAndSwap variants on our system that we're not currently handling. However, Ted's recent work on synthesized function bodies may make OSAtomicChecker unnecessary -- we'd just synthesize a single-threaded version of the function, and then inline it like any other inlineable function. So it's probably not worth it to update that checker right now, even with such a benign change. The reallocf change looks good. The place to add a test is unix-fns.c, which you probably already found. I'll let you come up with a test case just to practice. ;-) Welcome to the static analyzer! Jordan _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
