diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2011-01-18 02:00:16 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2011-01-18 02:00:16 +0000 |
commit | dec0984fce504a39a7f085774fb67cfd9957be58 (patch) | |
tree | 55173b9ff3c2a9fdc4be568145ce61ad5cb8f05e /lib/Sema/SemaDeclCXX.cpp | |
parent | fb1e3bc29b667f4275e1d5a43d64ec173f4f9a7d (diff) |
Fix warnings found by gcc-4.6, from -Wunused-but-set-variable and
-Wint-to-pointer-cast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123719 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index e7bd7d5e87..c736d47d43 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -4995,10 +4995,7 @@ void Sema::DefineImplicitCopyAssignment(SourceLocation CurrentLocation, // Form the assignment: // static_cast<Base*>(this)->Base::operator=(static_cast<Base&>(other)); QualType BaseType = Base->getType().getUnqualifiedType(); - CXXRecordDecl *BaseClassDecl = 0; - if (const RecordType *BaseRecordT = BaseType->getAs<RecordType>()) - BaseClassDecl = cast<CXXRecordDecl>(BaseRecordT->getDecl()); - else { + if (!BaseType->isRecordType()) { Invalid = true; continue; } @@ -6220,8 +6217,6 @@ Decl *Sema::ActOnExceptionDeclarator(Scope *S, Declarator &D) { Invalid = true; } - QualType ExDeclType = TInfo->getType(); - IdentifierInfo *II = D.getIdentifier(); if (NamedDecl *PrevDecl = LookupSingleName(S, II, D.getIdentifierLoc(), LookupOrdinaryName, |