summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2011-01-18 02:00:16 +0000
committerJeffrey Yasskin <jyasskin@google.com>2011-01-18 02:00:16 +0000
commit8dfa5f1776c2703bba757c388acf90c7fd8551b4 (patch)
tree49cbe6a9f4573808eb03cc846d95b3813e4c1de1 /clang/lib/Parse/ParseObjc.cpp
parente46bc4cec56c56e60e3ba034ffbf834fadd63cec (diff)
downloadbcm5719-llvm-8dfa5f1776c2703bba757c388acf90c7fd8551b4.tar.gz
bcm5719-llvm-8dfa5f1776c2703bba757c388acf90c7fd8551b4.zip
Fix warnings found by gcc-4.6, from -Wunused-but-set-variable and
-Wint-to-pointer-cast. llvm-svn: 123719
Diffstat (limited to 'clang/lib/Parse/ParseObjc.cpp')
-rw-r--r--clang/lib/Parse/ParseObjc.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp
index 2d293c5aeba..af53d7d592d 100644
--- a/clang/lib/Parse/ParseObjc.cpp
+++ b/clang/lib/Parse/ParseObjc.cpp
@@ -150,7 +150,9 @@ Decl *Parser::ParseObjCAtInterfaceDeclaration(SourceLocation atLoc,
SourceLocation nameLoc = ConsumeToken();
if (Tok.is(tok::l_paren) &&
!isKnownToBeTypeSpecifier(GetLookAheadToken(1))) { // we have a category.
- SourceLocation lparenLoc = ConsumeParen();
+ // TODO(dgregor): Use the return value from the next line to provide better
+ // recovery.
+ ConsumeParen();
SourceLocation categoryLoc, rparenLoc;
IdentifierInfo *categoryId = 0;
if (Tok.is(tok::code_completion)) {
@@ -1298,7 +1300,7 @@ Decl *Parser::ParseObjCAtImplementationDeclaration(
if (Tok.is(tok::l_paren)) {
// we have a category implementation.
- SourceLocation lparenLoc = ConsumeParen();
+ ConsumeParen();
SourceLocation categoryLoc, rparenLoc;
IdentifierInfo *categoryId = 0;
@@ -1418,7 +1420,7 @@ Decl *Parser::ParseObjCAtAliasDeclaration(SourceLocation atLoc) {
Decl *Parser::ParseObjCPropertySynthesize(SourceLocation atLoc) {
assert(Tok.isObjCAtKeyword(tok::objc_synthesize) &&
"ParseObjCPropertyDynamic(): Expected '@synthesize'");
- SourceLocation loc = ConsumeToken(); // consume synthesize
+ ConsumeToken(); // consume synthesize
while (true) {
if (Tok.is(tok::code_completion)) {
@@ -1473,7 +1475,7 @@ Decl *Parser::ParseObjCPropertySynthesize(SourceLocation atLoc) {
Decl *Parser::ParseObjCPropertyDynamic(SourceLocation atLoc) {
assert(Tok.isObjCAtKeyword(tok::objc_dynamic) &&
"ParseObjCPropertyDynamic(): Expected '@dynamic'");
- SourceLocation loc = ConsumeToken(); // consume dynamic
+ ConsumeToken(); // consume dynamic
while (true) {
if (Tok.is(tok::code_completion)) {
Actions.CodeCompleteObjCPropertyDefinition(getCurScope(), ObjCImpDecl);
OpenPOWER on IntegriCloud