[cfe-commits] r146174 - in /cfe/trunk: lib/Analysis/ThreadSafety.cpp lib/Sema/AnalysisBasedWarnings.cpp test/SemaCXX/warn-thread-safety-analysis.cpp
David Blaikie
dblaikie at gmail.com
Thu Dec 8 13:52:10 PST 2011
On Thu, Dec 8, 2011 at 1:32 PM, Chandler Carruth <chandlerc at google.com> wrote:
> On Thu, Dec 8, 2011 at 12:45 PM, Delesley Hutchins <delesley at google.com>
> wrote:
>>
>> I don't like the second warning, but it's not necessarily all that
>> easy to get rid of it. As with many warnings, once the compiler is
>> confused, you may get several warnings due to one mistake. It's hard
>> to avoid that in all cases.
>
>
> But that's not really the case here. The compiler isn't confused.
>
> It seems like when you are warning about an invalid locking pattern, you
> should mark the aspects of that pattern already warned about as invalid to
> suppress subsequent warnings on them.
>
> For example, when you see a lock acquired a second time, warn about it, but
> then suppress both the acquisition and the subsequent (paired) release from
> the lockset so that you don't get further warnings.
Yep - I was just checking it wasn't an ignored side-effect. A simple
"FIXME" beside the extra warning might be nice - so that anyone fixing
this in the future wouldn't be mislead into thinking this was somehow
by design. But Delesley's response at least indicates we're on the
same page in terms of it being extraneous - various judgments about
how easy/hard it would be to fix, what kind of priority it has, etc
exist & I'm not too fussed about that. If I care about it greatly I
might try my hand at fixing this at some point, but not a big deal.
- David
More information about the cfe-commits
mailing list