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

Issue 4538074: Warn on NULL to integer conversion (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 11 months ago by rtrieu
Modified:
12 years, 10 months ago
Reviewers:
chandlerc
Base URL:
https://llvm.org/svn/llvm-project/cfe/trunk/
Visibility:
Public.

Patch Set 1 #

Total comments: 6

Patch Set 2 : Move null pointer implicit cast check to where the other implicit cast checks are. #

Patch Set 3 : Remove commented out code. #

Total comments: 2

Patch Set 4 : Early return from CheckImplicitConversion() when a constant NULL pointer is found. #

Patch Set 5 : Updating base revision. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -1 line) Patch
M include/clang/Basic/DiagnosticSemaKinds.td View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M lib/Sema/SemaChecking.cpp View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M test/SemaCXX/conversion.cpp View 1 2 3 4 2 chunks +11 lines, -0 lines 0 comments Download

Messages

Total messages: 4
chandlerc
http://codereview.appspot.com/4538074/diff/1/include/clang/Basic/DiagnosticSemaKinds.td File include/clang/Basic/DiagnosticSemaKinds.td (right): http://codereview.appspot.com/4538074/diff/1/include/clang/Basic/DiagnosticSemaKinds.td#newcode1263 include/clang/Basic/DiagnosticSemaKinds.td:1263: def warn_impcast_null_to_integer : Warning< to agree with above, 'null_pointer_to_integer' ...
12 years, 11 months ago (2011-05-26 10:32:04 UTC) #1
rtrieu
Switch warning to DefaultIgnore and move checking code so that it is now with the ...
12 years, 10 months ago (2011-05-28 00:20:25 UTC) #2
chandlerc
Looks good with the tweak below... For reference, the rest of the code is provably ...
12 years, 10 months ago (2011-05-28 07:10:47 UTC) #3
rtrieu
12 years, 10 months ago (2011-05-29 20:04:47 UTC) #4
This patch has been committed at revision 132297.

http://codereview.appspot.com/4538074/diff/5002/lib/Sema/SemaChecking.cpp
File lib/Sema/SemaChecking.cpp (right):

http://codereview.appspot.com/4538074/diff/5002/lib/Sema/SemaChecking.cpp#new...
lib/Sema/SemaChecking.cpp:2973: << E->getSourceRange() <<
clang::SourceRange(CC);
On 2011/05/28 07:10:47, chandlerc wrote:
> Do we want to return here?

Done.
Sign in to reply to this message.

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