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

Issue 4631063: Refactor pointer arithmetic checking

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 6 months ago by chandlerc
Modified:
14 years, 6 months ago
Reviewers:
Visibility:
Public.
This patch refactors the pointer arithmetic checking into a single place in SemaExpr.cpp. It provides two interfaces, one for checking a single pointer operand, one for checking both operands of a binary operator. The second interface goes to some lengths to DTRT for a mixture of good and bad operands on the LHS or RHS. It also cleans up several aspects of the accompanying diagnostics to be more clearly worded, and provide more information when diagnosing (for example) both the LHS and RHS of a binary operator. It also makes the types shown be consistently shown as the pointee types instead of pointer types. There is still a fair amount of cleanup I'd like to do here, potentially either simplifying some code, hooking up more clients to the code, and/or lifting more common checking into these routines. This should also help pave the way for a more principled place to perform warnings such as the NULL-pointer arithmetic warnings.

Patch Set 1 #

Created: 14 years, 6 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+175 lines, -152 lines) Patch
M include/clang/Basic/DiagnosticSemaKinds.td View 2 chunks +9 lines, -5 lines 0 comments Download
M lib/Sema/SemaExpr.cpp View 8 chunks +145 lines, -126 lines 0 comments Download
M test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp View 1 chunk +1 line, -1 line 0 comments Download
M test/Sema/incomplete-decl.c View 1 chunk +1 line, -1 line 0 comments Download
M test/Sema/pointer-addition.c View 1 chunk +13 lines, -13 lines 0 comments Download
M test/Sema/pointer-subtract-compat.c View 1 chunk +1 line, -1 line 0 comments Download
M test/Sema/typecheck-binop.c View 1 chunk +3 lines, -3 lines 0 comments Download
M test/SemaCXX/null_in_arithmetic_ops.cpp View 1 chunk +1 line, -1 line 0 comments Download
M test/SemaObjC/sizeof-interface.m View 1 chunk +1 line, -1 line 0 comments Download
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

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