From 76bb5cabfa33371a8b3920fc4bc6b53c46478ea6 Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Mon, 10 Sep 2012 21:20:09 +0000 Subject: [PATCH] Remove redundant semicolons which are null statements. llvm-svn: 163546 --- clang/lib/AST/CommentSema.cpp | 2 +- clang/lib/AST/DeclBase.cpp | 2 +- clang/lib/AST/DeclPrinter.cpp | 2 +- clang/lib/Analysis/PrintfFormatString.cpp | 2 +- clang/lib/Analysis/ScanfFormatString.cpp | 2 +- clang/lib/CodeGen/CGExprCXX.cpp | 2 +- clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp | 2 +- clang/lib/Rewrite/Frontend/RewriteObjC.cpp | 2 +- clang/lib/Sema/SemaDeclCXX.cpp | 2 +- clang/lib/Sema/SemaExprCXX.cpp | 2 +- clang/lib/Sema/SemaTemplate.cpp | 2 +- clang/lib/Sema/TreeTransform.h | 2 +- clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/clang/lib/AST/CommentSema.cpp b/clang/lib/AST/CommentSema.cpp index 953afe147eaf..e57dac71044d 100644 --- a/clang/lib/AST/CommentSema.cpp +++ b/clang/lib/AST/CommentSema.cpp @@ -675,7 +675,7 @@ unsigned Sema::correctTypoInParmVarReference( if (Corrector.getBestDecl()) return Corrector.getBestDeclIndex(); else - return ParamCommandComment::InvalidParamIndex;; + return ParamCommandComment::InvalidParamIndex; } namespace { diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index f9ce46def5b9..4400d503f263 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -961,7 +961,7 @@ DeclContext::lookup_result ExternalASTSource::SetExternalVisibleDeclsForName(const DeclContext *DC, DeclarationName Name, ArrayRef Decls) { - ASTContext &Context = DC->getParentASTContext();; + ASTContext &Context = DC->getParentASTContext(); StoredDeclsMap *Map; if (!(Map = DC->LookupPtr.getPointer())) diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp index 4cba2b0977fa..56fc8e19c4f4 100644 --- a/clang/lib/AST/DeclPrinter.cpp +++ b/clang/lib/AST/DeclPrinter.cpp @@ -462,7 +462,7 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) { if (I) Proto += ", "; - Proto += FT->getExceptionType(I).getAsString(SubPolicy);; + Proto += FT->getExceptionType(I).getAsString(SubPolicy); } Proto += ")"; } else if (FT && isNoexceptExceptionSpec(FT->getExceptionSpecType())) { diff --git a/clang/lib/Analysis/PrintfFormatString.cpp b/clang/lib/Analysis/PrintfFormatString.cpp index 9a4f0ca6bba8..b85c1c425b2b 100644 --- a/clang/lib/Analysis/PrintfFormatString.cpp +++ b/clang/lib/Analysis/PrintfFormatString.cpp @@ -223,7 +223,7 @@ bool clang::analyze_format_string::ParsePrintfString(FormatStringHandler &H, // Did a fail-stop error of any kind occur when parsing the specifier? // If so, don't do any more processing. if (FSR.shouldStop()) - return true;; + return true; // Did we exhaust the string or encounter an error that // we can recover from? if (!FSR.hasValue()) diff --git a/clang/lib/Analysis/ScanfFormatString.cpp b/clang/lib/Analysis/ScanfFormatString.cpp index 082c06af5893..92a7d9c1dd4e 100644 --- a/clang/lib/Analysis/ScanfFormatString.cpp +++ b/clang/lib/Analysis/ScanfFormatString.cpp @@ -476,7 +476,7 @@ bool clang::analyze_format_string::ParseScanfString(FormatStringHandler &H, // Did a fail-stop error of any kind occur when parsing the specifier? // If so, don't do any more processing. if (FSR.shouldStop()) - return true;; + return true; // Did we exhaust the string or encounter an error that // we can recover from? if (!FSR.hasValue()) diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp index b4cd5c1c165f..3aa5e747812d 100644 --- a/clang/lib/CodeGen/CGExprCXX.cpp +++ b/clang/lib/CodeGen/CGExprCXX.cpp @@ -886,7 +886,7 @@ CodeGenFunction::EmitNewArrayInitializer(const CXXNewExpr *E, if (constNum->getZExtValue() <= initializerElements) { // If there was a cleanup, deactivate it. if (cleanupDominator) - DeactivateCleanupBlock(cleanup, cleanupDominator);; + DeactivateCleanupBlock(cleanup, cleanupDominator); return; } } else { diff --git a/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp b/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp index 0dbdbaee332a..b2ba0f0359a4 100644 --- a/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp +++ b/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp @@ -4866,7 +4866,7 @@ void RewriteModernObjC::RewriteBlockPointerDecl(NamedDecl *ND) { else if (*argListBegin == '<') { buf += "/*"; buf += *argListBegin++; - OrigLength++;; + OrigLength++; while (*argListBegin != '>') { buf += *argListBegin++; OrigLength++; diff --git a/clang/lib/Rewrite/Frontend/RewriteObjC.cpp b/clang/lib/Rewrite/Frontend/RewriteObjC.cpp index 5a0ac541be27..62def16ab5bc 100644 --- a/clang/lib/Rewrite/Frontend/RewriteObjC.cpp +++ b/clang/lib/Rewrite/Frontend/RewriteObjC.cpp @@ -4183,7 +4183,7 @@ void RewriteObjC::RewriteBlockPointerDecl(NamedDecl *ND) { else if (*argListBegin == '<') { buf += "/*"; buf += *argListBegin++; - OrigLength++;; + OrigLength++; while (*argListBegin != '>') { buf += *argListBegin++; OrigLength++; diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 318342ec7615..5ee28da4efa7 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -4322,7 +4322,7 @@ bool SpecialMemberDeletionInfo::isAccessible(Subobject Subobj, /// If we're operating on a base class, the object type is the /// type of this special member. QualType objectTy; - AccessSpecifier access = target->getAccess();; + AccessSpecifier access = target->getAccess(); if (CXXBaseSpecifier *base = Subobj.dyn_cast()) { objectTy = S.Context.getTypeDeclType(MD->getParent()); access = CXXRecordDecl::MergeAccess(base->getAccessSpecifier(), access); diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index 0905607e7205..dc5fc284dcad 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -413,7 +413,7 @@ Sema::ActOnCXXTypeid(SourceLocation OpLoc, SourceLocation LParenLoc, /// Retrieve the UuidAttr associated with QT. static UuidAttr *GetUuidAttrOfType(QualType QT) { // Optionally remove one level of pointer, reference or array indirection. - const Type *Ty = QT.getTypePtr();; + const Type *Ty = QT.getTypePtr(); if (QT->isPointerType() || QT->isReferenceType()) Ty = QT->getPointeeType().getTypePtr(); else if (QT->isArrayType()) diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index 1e81f0d2996a..db9f7d3585e3 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -4426,7 +4426,7 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, case NPV_NullPointer: Diag(Arg->getExprLoc(), diag::warn_cxx98_compat_template_arg_null); Converted = TemplateArgument((Decl *)0); - return Owned(Arg);; + return Owned(Arg); } } diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 19636f41438f..0c1f1a42a041 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -6368,7 +6368,7 @@ TreeTransform::TransformCallExpr(CallExpr *E) { if (!getDerived().AlwaysRebuild() && Callee.get() == E->getCallee() && !ArgChanged) - return SemaRef.MaybeBindToTemporary(E);; + return SemaRef.MaybeBindToTemporary(E); // FIXME: Wrong source location information for the '('. SourceLocation FakeLParenLoc diff --git a/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp b/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp index 7a2586557168..90872058af55 100644 --- a/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp @@ -85,7 +85,7 @@ static bool scan_ivar_release(Stmt *S, ObjCIvarDecl *ID, Expr::NPC_ValueDependentIsNull)) { // This is only a 'release' if the property kind is not // 'assign'. - return PD->getSetterKind() != ObjCPropertyDecl::Assign;; + return PD->getSetterKind() != ObjCPropertyDecl::Assign; } // Recurse to children. -- GitLab