]> granicus.if.org Git - clang/commitdiff
Remove a set, but unused variable. Found with GCC's warning.
authorChandler Carruth <chandlerc@gmail.com>
Tue, 10 Jan 2012 18:26:14 +0000 (18:26 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 10 Jan 2012 18:26:14 +0000 (18:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147864 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclCXX.cpp

index 0ca75df591e9bfc6dfcf04ca4e6172d342cfb357..39f79757be39aa6227a8a3ef0b6170d1ea035a0e 100644 (file)
@@ -5532,7 +5532,6 @@ Decl *Sema::ActOnStartNamespaceDef(Scope *NamespcScope,
   // For anonymous namespace, take the location of the left brace.
   SourceLocation Loc = II ? IdentLoc : LBrace;
   bool IsInline = InlineLoc.isValid();
-  bool IsInvalid = false;
   bool IsStd = false;
   bool AddToKnown = false;
   Scope *DeclRegionScope = NamespcScope->getParent();
@@ -5587,7 +5586,6 @@ Decl *Sema::ActOnStartNamespaceDef(Scope *NamespcScope,
       Diag(Loc, diag::err_redefinition_different_kind)
         << II;
       Diag(PrevDecl->getLocation(), diag::note_previous_definition);
-      IsInvalid = true;
       // Continue on to push Namespc as current DeclContext and return it.
     } else if (II->isStr("std") &&
                CurContext->getRedeclContext()->isTranslationUnit()) {
@@ -5617,8 +5615,7 @@ Decl *Sema::ActOnStartNamespaceDef(Scope *NamespcScope,
       Diag(Loc, diag::err_inline_namespace_mismatch)
         << IsInline;
       Diag(PrevNS->getLocation(), diag::note_previous_definition);
-      IsInvalid = true;
-      
+
       // Recover by ignoring the new namespace's inline status.
       IsInline = PrevNS->isInline();
     }