Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(328)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 4954041: Adding support for guarded_by/var and pt_guarded_by/var annotations

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

Patch Set 1 #

Total comments: 11

Patch Set 2 : Fixes based on reviewer feedback #

Created: 14 years, 4 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+245 lines, -5 lines) Patch
M include/clang/Basic/DiagnosticSemaKinds.td View 1 1 chunk +13 lines, -0 lines 0 comments Download
M lib/Sema/AnalysisBasedWarnings.cpp View 1 3 chunks +119 lines, -4 lines 0 comments Download
M test/SemaCXX/warn-thread-safety-analysis.cpp View 1 2 chunks +113 lines, -1 line 0 comments Download
Total messages: 3
|
chandlerc
http://codereview.appspot.com/4954041/diff/1/include/clang/Basic/DiagnosticSemaKinds.td File include/clang/Basic/DiagnosticSemaKinds.td (right): http://codereview.appspot.com/4954041/diff/1/include/clang/Basic/DiagnosticSemaKinds.td#newcode1411 include/clang/Basic/DiagnosticSemaKinds.td:1411: "accessing dereferenced variable '%0' requires lock '%1'">, I wonder ...
14 years, 4 months ago (2011年08月29日 17:52:41 UTC) #1
http://codereview.appspot.com/4954041/diff/1/include/clang/Basic/DiagnosticSe...
File include/clang/Basic/DiagnosticSemaKinds.td (right):
http://codereview.appspot.com/4954041/diff/1/include/clang/Basic/DiagnosticSe...
include/clang/Basic/DiagnosticSemaKinds.td:1411: "accessing dereferenced
variable '%0' requires lock '%1'">,
I wonder if this would be read better as:
accessing the value pointed to by variable '...' requires lock '...'
http://codereview.appspot.com/4954041/diff/1/lib/Sema/AnalysisBasedWarnings.cpp
File lib/Sema/AnalysisBasedWarnings.cpp (left):
http://codereview.appspot.com/4954041/diff/1/lib/Sema/AnalysisBasedWarnings.c...
lib/Sema/AnalysisBasedWarnings.cpp:823: /// \param LockExp The lock expression
corresponding to the lock to be added
Why did this comment leave?
http://codereview.appspot.com/4954041/diff/1/lib/Sema/AnalysisBasedWarnings.cpp
File lib/Sema/AnalysisBasedWarnings.cpp (right):
http://codereview.appspot.com/4954041/diff/1/lib/Sema/AnalysisBasedWarnings.c...
lib/Sema/AnalysisBasedWarnings.cpp:855: if (DR)
Always put these inside the condition:
if (const DeclRefExpr *DR = dyn_cast<...>(...))
 return DR->getDecl();
http://codereview.appspot.com/4954041/diff/1/lib/Sema/AnalysisBasedWarnings.c...
lib/Sema/AnalysisBasedWarnings.cpp:862: return NULL;
s/NULL/0/
http://codereview.appspot.com/4954041/diff/1/lib/Sema/AnalysisBasedWarnings.c...
lib/Sema/AnalysisBasedWarnings.cpp:867: /// \param Exp An expression that has
been read or written.
Parameter commets shouldn't be placed in the middle of the comment block.
This entire comment is really hard to read. It could probably be cleaned up some
to flow better and/or be formatted better.
Sign in to reply to this message.
supertri
Made these changes. Ready to commit? http://codereview.appspot.com/4954041/diff/1/include/clang/Basic/DiagnosticSemaKinds.td File include/clang/Basic/DiagnosticSemaKinds.td (right): http://codereview.appspot.com/4954041/diff/1/include/clang/Basic/DiagnosticSemaKinds.td#newcode1411 include/clang/Basic/DiagnosticSemaKinds.td:1411: "accessing dereferenced variable ...
14 years, 4 months ago (2011年08月29日 18:40:51 UTC) #2
Made these changes. Ready to commit?
http://codereview.appspot.com/4954041/diff/1/include/clang/Basic/DiagnosticSe...
File include/clang/Basic/DiagnosticSemaKinds.td (right):
http://codereview.appspot.com/4954041/diff/1/include/clang/Basic/DiagnosticSe...
include/clang/Basic/DiagnosticSemaKinds.td:1411: "accessing dereferenced
variable '%0' requires lock '%1'">,
On 2011年08月29日 17:52:41, chandlerc wrote:
> I wonder if this would be read better as:
> 
> accessing the value pointed to by variable '...' requires lock '...'
Changed to:
accessing the value pointed to by '...' requires lock '...'
http://codereview.appspot.com/4954041/diff/1/lib/Sema/AnalysisBasedWarnings.cpp
File lib/Sema/AnalysisBasedWarnings.cpp (left):
http://codereview.appspot.com/4954041/diff/1/lib/Sema/AnalysisBasedWarnings.c...
lib/Sema/AnalysisBasedWarnings.cpp:823: /// \param LockExp The lock expression
corresponding to the lock to be added
On 2011年08月29日 17:52:41, chandlerc wrote:
> Why did this comment leave?
Comment is back!
http://codereview.appspot.com/4954041/diff/1/lib/Sema/AnalysisBasedWarnings.cpp
File lib/Sema/AnalysisBasedWarnings.cpp (right):
http://codereview.appspot.com/4954041/diff/1/lib/Sema/AnalysisBasedWarnings.c...
lib/Sema/AnalysisBasedWarnings.cpp:855: if (DR)
On 2011年08月29日 17:52:41, chandlerc wrote:
> Always put these inside the condition:
> 
> if (const DeclRefExpr *DR = dyn_cast<...>(...))
> return DR->getDecl();
Done.
http://codereview.appspot.com/4954041/diff/1/lib/Sema/AnalysisBasedWarnings.c...
lib/Sema/AnalysisBasedWarnings.cpp:862: return NULL;
On 2011年08月29日 17:52:41, chandlerc wrote:
> s/NULL/0/
Done.
http://codereview.appspot.com/4954041/diff/1/lib/Sema/AnalysisBasedWarnings.c...
lib/Sema/AnalysisBasedWarnings.cpp:867: /// \param Exp An expression that has
been read or written.
On 2011年08月29日 17:52:41, chandlerc wrote:
> Parameter commets shouldn't be placed in the middle of the comment block.
> 
> This entire comment is really hard to read. It could probably be cleaned up
some
> to flow better and/or be formatted better.
I deleted the "However" block and re-arranged the comment.
Sign in to reply to this message.
chandlerc
LGTM (modulo the comment below) http://codereview.appspot.com/4954041/diff/1/lib/Sema/AnalysisBasedWarnings.cpp File lib/Sema/AnalysisBasedWarnings.cpp (right): http://codereview.appspot.com/4954041/diff/1/lib/Sema/AnalysisBasedWarnings.cpp#newcode867 lib/Sema/AnalysisBasedWarnings.cpp:867: /// \param Exp An ...
14 years, 4 months ago (2011年08月29日 20:31:14 UTC) #3
LGTM
(modulo the comment below)
http://codereview.appspot.com/4954041/diff/1/lib/Sema/AnalysisBasedWarnings.cpp
File lib/Sema/AnalysisBasedWarnings.cpp (right):
http://codereview.appspot.com/4954041/diff/1/lib/Sema/AnalysisBasedWarnings.c...
lib/Sema/AnalysisBasedWarnings.cpp:867: /// \param Exp An expression that has
been read or written.
On 2011年08月29日 18:40:51, supertri wrote:
> On 2011年08月29日 17:52:41, chandlerc wrote:
> > Parameter commets shouldn't be placed in the middle of the comment block.
> > 
> > This entire comment is really hard to read. It could probably be cleaned up
> some
> > to flow better and/or be formatted better.
> 
> I deleted the "However" block and re-arranged the comment.
I think we do need to document the limitations of this approach as currently
implemented.
Sign in to reply to this message.
|
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /