Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(431)

Issue 4960064: Adding support for unparseable locks

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 8 months ago by supertri
Modified:
12 years, 8 months ago
Reviewers:
chandlerc
Visibility:
Public.

Patch Set 1 #

Patch Set 2 : Cleaned up slightly #

Total comments: 6

Patch Set 3 : Incorporating chandler comments #

Patch Set 4 : Fixed version #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -17 lines) Patch
M lib/Analysis/ThreadSafety.cpp View 1 2 3 9 chunks +36 lines, -15 lines 6 comments Download
M test/SemaCXX/warn-thread-safety-analysis.cpp View 1 2 3 3 chunks +36 lines, -2 lines 0 comments Download

Messages

Total messages: 6
chandlerc
http://codereview.appspot.com/4960064/diff/2001/lib/Analysis/ThreadSafety.cpp File lib/Analysis/ThreadSafety.cpp (left): http://codereview.appspot.com/4960064/diff/2001/lib/Analysis/ThreadSafety.cpp#oldcode159 lib/Analysis/ThreadSafety.cpp:159: Why the formatting change? (i find it makes the ...
12 years, 8 months ago (2011-09-12 04:34:20 UTC) #1
supertri
Let me know if the new draft is suitable to commit. http://codereview.appspot.com/4960064/diff/2001/lib/Analysis/ThreadSafety.cpp File lib/Analysis/ThreadSafety.cpp (left): ...
12 years, 8 months ago (2011-09-12 17:15:25 UTC) #2
supertri
Actually, that one was hilariously broken. Here is a better version. Cheers, Caitlin On Mon, ...
12 years, 8 months ago (2011-09-13 17:34:52 UTC) #3
chandlerc
Fundamentally, you still need to add tests that produce errors because of invalid locks. There ...
12 years, 8 months ago (2011-09-13 23:16:20 UTC) #4
supertri
There are test cases in this patch, what should change in them? http://codereview.appspot.com/4960064/diff/8001/lib/Analysis/ThreadSafety.cpp File lib/Analysis/ThreadSafety.cpp ...
12 years, 8 months ago (2011-09-14 01:41:57 UTC) #5
chandlerc
12 years, 8 months ago (2011-09-14 03:01:43 UTC) #6
Sorry if I missed the updated tests last time... i blame rietveld, although i've
no idea if its just my fault.

Anyways, feel free to submit this whenever, the nitpicks about the
representation shouldn't hold anything up.

http://codereview.appspot.com/4960064/diff/8001/lib/Analysis/ThreadSafety.cpp
File lib/Analysis/ThreadSafety.cpp (right):

http://codereview.appspot.com/4960064/diff/8001/lib/Analysis/ThreadSafety.cpp...
lib/Analysis/ThreadSafety.cpp:175: return;
On 2011/09/14 01:41:57, supertri wrote:
> On 2011/09/13 23:16:20, chandlerc wrote:
> > Why bother to return or have an else?
> > 
> > Alternatively make 171 read 'else if (isa<...>(Exp) && Parent)'
> 
> Note that this would have different behaviour, because it would result in
Valid
> being set to false. In particular, when analyzing inline functions, the this
> expressions are compared without parents.

I'm still not seeing how the logic you have here is different... But its not a
huge deal.

http://codereview.appspot.com/4960064/diff/8001/lib/Analysis/ThreadSafety.cpp...
lib/Analysis/ThreadSafety.cpp:185: if (DeclSeq.empty())
On 2011/09/14 01:41:57, supertri wrote:
> On 2011/09/13 23:16:20, chandlerc wrote:
> > I'm still a bit surprised we can't just impliment isValid() as
> 'DeclSeq.empty()'
> > and omit the bool entirely.
> 
> There are two causes of unparseable lock expressions:
> 
> 1) empty decl sequence (recursion bottomed out without going anywhere)
> 2) we start filling the decl sequence, and then encounter an expression type
we
> do not know how to deal with.

Sure, why not DeclSeq.clear() when #2 happens?
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b