http://codereview.appspot.com/4995046/diff/1/lib/Analysis/ThreadSafety.cpp File lib/Analysis/ThreadSafety.cpp (right): http://codereview.appspot.com/4995046/diff/1/lib/Analysis/ThreadSafety.cpp#ne... lib/Analysis/ThreadSafety.cpp:645: static SourceLocation getFirstStmtLoc(const CFGBlock *Block) { Why this change? Specifically, why change the name of the function? http://codereview.appspot.com/4995046/diff/1/lib/Analysis/ThreadSafety.cpp#ne... lib/Analysis/ThreadSafety.cpp:705: if (I != E && D->hasAttrs()) { Rather than pulling I and E out of the for loop, just check .empty() here? That would seem much nicer. I don't really like having non-loop variables called I and E.... http://codereview.appspot.com/4995046/diff/1/test/SemaCXX/warn-thread-safety-... File test/SemaCXX/warn-thread-safety-analysis.cpp (right): http://codereview.appspot.com/4995046/diff/1/test/SemaCXX/warn-thread-safety-... test/SemaCXX/warn-thread-safety-analysis.cpp:664: void es_fun_10() __attribute__((exclusive_locks_required(aa_mu))); No errors or other tests? this seems rather lightly exercised...
http://codereview.appspot.com/4995046/diff/1/lib/Analysis/ThreadSafety.cpp File lib/Analysis/ThreadSafety.cpp (right): http://codereview.appspot.com/4995046/diff/1/lib/Analysis/ThreadSafety.cpp#ne... lib/Analysis/ThreadSafety.cpp:645: static SourceLocation getFirstStmtLoc(const CFGBlock *Block) { On 2011/09/15 00:44:02, chandlerc wrote: > Why this change? Specifically, why change the name of the function? Changed back. http://codereview.appspot.com/4995046/diff/1/lib/Analysis/ThreadSafety.cpp#ne... lib/Analysis/ThreadSafety.cpp:705: if (I != E && D->hasAttrs()) { On 2011/09/15 00:44:02, chandlerc wrote: > Rather than pulling I and E out of the for loop, just check .empty() here? That > would seem much nicer. I don't really like having non-loop variables called I > and E.... Done. http://codereview.appspot.com/4995046/diff/1/test/SemaCXX/warn-thread-safety-... File test/SemaCXX/warn-thread-safety-analysis.cpp (right): http://codereview.appspot.com/4995046/diff/1/test/SemaCXX/warn-thread-safety-... test/SemaCXX/warn-thread-safety-analysis.cpp:664: void es_fun_10() __attribute__((exclusive_locks_required(aa_mu))); On 2011/09/15 00:44:02, chandlerc wrote: > No errors or other tests? this seems rather lightly exercised... This code suppresses erroneous errors, but does not produce any additional errors. I would have written more, but am committing about 10 test cases from annotalysis that use this feature shortly.