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

Issue 3888041: [PATCH] Fix warnings found by gcc-4.6 (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 10 months ago by Jeffrey Yasskin
Modified:
13 years, 10 months ago
CC:
cfe-commits_cs.uiuc.edu
Base URL:
https://llvm.org/svn/llvm-project/cfe/trunk/
Visibility:
Public.

Description

Most of these were found by the new -Wunused-but-set-variable warning. Several of these unused variables look like they ought to have been used, so someone who knows this code better than I do should check whether the new warnings found some bugs. I also fixed some spurious -Wint-to-pointer-cast warnings. I checked that everything was fixed with `make CFLAGS="-Werror" CXXFLAGS="-Werror"`

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -68 lines) Patch
M include/clang/Basic/SourceLocation.h View 2 chunks +17 lines, -1 line 0 comments Download
M lib/CodeGen/CGExpr.cpp View 2 chunks +0 lines, -2 lines 0 comments Download
M lib/CodeGen/CGExprComplex.cpp View 1 chunk +1 line, -1 line 0 comments Download
M lib/CodeGen/CGObjC.cpp View 2 chunks +0 lines, -3 lines 0 comments Download
M lib/CodeGen/ItaniumCXXABI.cpp View 2 chunks +3 lines, -4 lines 0 comments Download
M lib/GR/CXXExprEngine.cpp View 1 chunk +0 lines, -6 lines 0 comments Download
M lib/GR/Checkers/ExprEngine.cpp View 2 chunks +0 lines, -3 lines 0 comments Download
M lib/Lex/PPMacroExpansion.cpp View 1 chunk +1 line, -0 lines 1 comment Download
M lib/Parse/ParseDecl.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M lib/Parse/ParseDeclCXX.cpp View 2 chunks +1 line, -2 lines 0 comments Download
M lib/Parse/ParseExpr.cpp View 2 chunks +1 line, -2 lines 0 comments Download
M lib/Parse/ParseExprCXX.cpp View 1 chunk +1 line, -1 line 0 comments Download
M lib/Parse/ParseObjc.cpp View 4 chunks +4 lines, -4 lines 1 comment Download
M lib/Parse/ParseStmt.cpp View 1 chunk +1 line, -4 lines 0 comments Download
M lib/Parse/ParseTemplate.cpp View 2 chunks +1 line, -3 lines 0 comments Download
M lib/Parse/ParseTentative.cpp View 1 chunk +0 lines, -3 lines 0 comments Download
M lib/Rewrite/RewriteObjC.cpp View 2 chunks +0 lines, -2 lines 0 comments Download
M lib/Sema/SemaCXXCast.cpp View 1 chunk +0 lines, -2 lines 0 comments Download
M lib/Sema/SemaDeclCXX.cpp View 2 chunks +1 line, -6 lines 1 comment Download
M lib/Sema/SemaExpr.cpp View 1 chunk +1 line, -1 line 0 comments Download
M lib/Sema/SemaExprCXX.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M lib/Sema/SemaTemplate.cpp View 4 chunks +0 lines, -6 lines 0 comments Download
M lib/Sema/SemaTemplateDeduction.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M lib/Sema/TreeTransform.h View 1 chunk +0 lines, -1 line 0 comments Download
M lib/Serialization/ASTWriterDecl.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M tools/libclang/CIndex.cpp View 2 chunks +5 lines, -5 lines 0 comments Download
M tools/libclang/CXCursor.cpp View 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 3
Jeffrey Yasskin
The full patch is at http://codereview.appspot.com/download/issue3888041_1.diff. Please take a look.
13 years, 10 months ago (2011-01-07 00:53:36 UTC) #1
DougGregor
Looks great, please commit! http://codereview.appspot.com/3888041/diff/1/lib/Lex/PPMacroExpansion.cpp File lib/Lex/PPMacroExpansion.cpp (right): http://codereview.appspot.com/3888041/diff/1/lib/Lex/PPMacroExpansion.cpp#newcode865 lib/Lex/PPMacroExpansion.cpp:865: assert(IsValid && "invalid __has_include"); (void)IsValid; ...
13 years, 10 months ago (2011-01-17 19:32:54 UTC) #2
Jeffrey Yasskin (google)
13 years, 10 months ago (2011-01-18 02:14:35 UTC) #3
Thanks, committed. I switched to isRecordType and gave you a TODO over
the lparenLoc.

On Mon, Jan 17, 2011 at 11:32 AM,  <doug.gregor@gmail.com> wrote:
> Looks great, please commit!
>
>
> http://codereview.appspot.com/3888041/diff/1/lib/Lex/PPMacroExpansion.cpp
> File lib/Lex/PPMacroExpansion.cpp (right):
>
>
http://codereview.appspot.com/3888041/diff/1/lib/Lex/PPMacroExpansion.cpp#new...
> lib/Lex/PPMacroExpansion.cpp:865: assert(IsValid && "invalid
> __has_include"); (void)IsValid;
> FWIW, Chris has already cleaned up this bit.
>
> http://codereview.appspot.com/3888041/diff/1/lib/Parse/ParseObjc.cpp
> File lib/Parse/ParseObjc.cpp (left):
>
>
http://codereview.appspot.com/3888041/diff/1/lib/Parse/ParseObjc.cpp#oldcode149
> lib/Parse/ParseObjc.cpp:149: SourceLocation lparenLoc = ConsumeParen();
> The fact that we're not using lparenLoc means that we're providing poor
> recovery here (e.g., by not using MatchRHSPunctuation). It's not your
> problem to fix, but thanks for pointing it out!
>
> http://codereview.appspot.com/3888041/diff/1/lib/Sema/SemaDeclCXX.cpp
> File lib/Sema/SemaDeclCXX.cpp (right):
>
>
http://codereview.appspot.com/3888041/diff/1/lib/Sema/SemaDeclCXX.cpp#newcode...
> lib/Sema/SemaDeclCXX.cpp:4930: if (!BaseType->getAs<RecordType>()) {
> How about
>
>   if (!BaseType->isRecordType())
>
> which is slightly more efficient?
>
> http://codereview.appspot.com/3888041/
> _______________________________________________
> cfe-commits mailing list
> cfe-commits@cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
Sign in to reply to this message.

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