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
(121)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 4641041: Rework the sizeof / memset warning.

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

Patch Set 1 #

Total comments: 6
Created: 14 years, 7 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -32 lines) Patch
M include/clang/Basic/DiagnosticSemaKinds.td View 1 chunk +9 lines, -3 lines 0 comments Download
M lib/Sema/SemaChecking.cpp View 3 chunks +69 lines, -22 lines 6 comments Download
M test/SemaCXX/warn-memset-bad-sizeof.cpp View 1 chunk +10 lines, -7 lines 0 comments Download
Total messages: 2
|
nlewycky1
Looks fine, minor comments. http://codereview.appspot.com/4641041/diff/1/lib/Sema/SemaChecking.cpp File lib/Sema/SemaChecking.cpp (right): http://codereview.appspot.com/4641041/diff/1/lib/Sema/SemaChecking.cpp#newcode1831 lib/Sema/SemaChecking.cpp:1831: /// \brief If E is ...
14 years, 6 months ago (2011年06月16日 16:53:00 UTC) #1
Looks fine, minor comments.
http://codereview.appspot.com/4641041/diff/1/lib/Sema/SemaChecking.cpp
File lib/Sema/SemaChecking.cpp (right):
http://codereview.appspot.com/4641041/diff/1/lib/Sema/SemaChecking.cpp#newcod...
lib/Sema/SemaChecking.cpp:1831: /// \brief If E is a sizeof expression returns
the argument expression,
returns *its argument expression
http://codereview.appspot.com/4641041/diff/1/lib/Sema/SemaChecking.cpp#newcod...
lib/Sema/SemaChecking.cpp:1837: return
SizeOf->getArgumentExpr()->IgnoreParenImpCasts();
Why the IgnoreParenImpCasts()?
http://codereview.appspot.com/4641041/diff/1/lib/Sema/SemaChecking.cpp#newcod...
lib/Sema/SemaChecking.cpp:1842: /// \brief If E is a sizeof expression returns
the argument type.
s/the/its/ again
Sign in to reply to this message.
chandlerc
Thanks for the review! http://codereview.appspot.com/4641041/diff/1/lib/Sema/SemaChecking.cpp File lib/Sema/SemaChecking.cpp (right): http://codereview.appspot.com/4641041/diff/1/lib/Sema/SemaChecking.cpp#newcode1831 lib/Sema/SemaChecking.cpp:1831: /// \brief If E is ...
14 years, 6 months ago (2011年06月21日 22:34:56 UTC) #2
Thanks for the review!
http://codereview.appspot.com/4641041/diff/1/lib/Sema/SemaChecking.cpp
File lib/Sema/SemaChecking.cpp (right):
http://codereview.appspot.com/4641041/diff/1/lib/Sema/SemaChecking.cpp#newcod...
lib/Sema/SemaChecking.cpp:1831: /// \brief If E is a sizeof expression returns
the argument expression,
On 2011年06月16日 16:53:00, nlewycky1 wrote:
> returns *its argument expression
Done.
http://codereview.appspot.com/4641041/diff/1/lib/Sema/SemaChecking.cpp#newcod...
lib/Sema/SemaChecking.cpp:1837: return
SizeOf->getArgumentExpr()->IgnoreParenImpCasts();
On 2011年06月16日 16:53:00, nlewycky1 wrote:
> Why the IgnoreParenImpCasts()?
sizeof ((((x))))
Seemed nice not need every caller to do this. I could potentially not strip imp
casts, i can't conceive of a way they would be present in the AST within a
sizeof argument (as it would kinda defeat the purpose...) but I was mirroring
the logic applied to the src/dest argument in these functions.
http://codereview.appspot.com/4641041/diff/1/lib/Sema/SemaChecking.cpp#newcod...
lib/Sema/SemaChecking.cpp:1842: /// \brief If E is a sizeof expression returns
the argument type.
On 2011年06月16日 16:53:00, nlewycky1 wrote:
> s/the/its/ again
Done.
Sign in to reply to this message.
|
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

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