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

Issue 5695049: Expand the set of expressions that can be used to denote locks.

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by delesley
Modified:
9 years, 4 months ago
Reviewers:
Richard Smith
Visibility:
Public.

Patch Set 1 #

Total comments: 13
Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -5 lines) Patch
M lib/Analysis/ThreadSafety.cpp View 2 chunks +32 lines, -3 lines 12 comments Download
M test/SemaCXX/warn-thread-safety-analysis.cpp View 2 chunks +82 lines, -2 lines 1 comment Download

Messages

Total messages: 2
Richard Smith
http://codereview.appspot.com/5695049/diff/1/lib/Analysis/ThreadSafety.cpp File lib/Analysis/ThreadSafety.cpp (right): http://codereview.appspot.com/5695049/diff/1/lib/Analysis/ThreadSafety.cpp#newcode92 lib/Analysis/ThreadSafety.cpp:92: unsigned NumArgs, Expr **FunArgs) { This function should probably ...
12 years, 2 months ago (2012-03-03 00:12:46 UTC) #1
delesley
12 years, 2 months ago (2012-03-05 18:30:11 UTC) #2
http://codereview.appspot.com/5695049/diff/1/lib/Analysis/ThreadSafety.cpp
File lib/Analysis/ThreadSafety.cpp (right):

http://codereview.appspot.com/5695049/diff/1/lib/Analysis/ThreadSafety.cpp#ne...
lib/Analysis/ThreadSafety.cpp:92: unsigned NumArgs, Expr **FunArgs) {

Agreed.  I need to redo the whole thing -- I'll do it then.

On 2012/03/03 00:12:46, Richard Smith wrote:
> This function should probably eventually be recast as a StmtVisitor -- no need
> to do so yet, but something to keep in mind.

http://codereview.appspot.com/5695049/diff/1/lib/Analysis/ThreadSafety.cpp#ne...
lib/Analysis/ThreadSafety.cpp:134: Expr** CallArgs = CMCE->getArgs();
On 2012/03/03 00:12:46, Richard Smith wrote:
> ' **' not '** ', please.

Done.

http://codereview.appspot.com/5695049/diff/1/lib/Analysis/ThreadSafety.cpp#ne...
lib/Analysis/ThreadSafety.cpp:135: for (unsigned i = 0; i < NumCallArgs; ++i) {
Action pending result of upcoming duel with Chandler.  

On 2012/03/03 00:12:46, Richard Smith wrote:
> 'I', not 'i'.

http://codereview.appspot.com/5695049/diff/1/lib/Analysis/ThreadSafety.cpp#ne...
lib/Analysis/ThreadSafety.cpp:137: }
On 2012/03/03 00:12:46, Richard Smith wrote:
> No need for braces here.

Done.

http://codereview.appspot.com/5695049/diff/1/lib/Analysis/ThreadSafety.cpp#ne...
lib/Analysis/ThreadSafety.cpp:139: buildMutexID(CE->getCallee(), D, Parent,
NumArgs, FunArgs);
Not easily.  I can unify the for loop, but the rest of the code is different, so
I'll still need to check which one I'm processing.  

On 2012/03/03 00:12:46, Richard Smith wrote:
> Can you unify this with the CXXMemberCallExpr case? (This should be
> straightforward since the code is so similar and CXXMemberCallExpr derives
from
> CallExpr).

http://codereview.appspot.com/5695049/diff/1/lib/Analysis/ThreadSafety.cpp#ne...
lib/Analysis/ThreadSafety.cpp:151: buildMutexID(CE->getSubExpr(), D, Parent,
NumArgs, FunArgs);
On 2012/03/03 00:12:46, Richard Smith wrote:
> I imagine you should also be skipping past ParenExprs. You could replace this
> check with an 'Exp = Exp->IgnoreParenCasts();' at the top of this function.

Done.
Sign in to reply to this message.

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