diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index 1e10094aeeea2f84c6d193652e0b47a075710583..a62ca5f9b4d7f3ec754f5f54edf98d53d90beda7 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -1344,7 +1344,7 @@ Optional<ArrayRef<QualType>> Type::getObjCSubstitutions(
   } else if (getAs<BlockPointerType>()) {
     ASTContext &ctx = dc->getParentASTContext();
     objectType = ctx.getObjCObjectType(ctx.ObjCBuiltinIdTy, { }, { })
-                   ->castAs<ObjCObjectType>();;
+                   ->castAs<ObjCObjectType>();
   } else {
     objectType = getAs<ObjCObjectType>();
   }
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index c189112e3455e8341a1a0e1347c54b25e238513e..8c8402e75e3781c6d3768143385e6fb8aedb8996 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -3367,7 +3367,7 @@ classifyPointerDeclarator(Sema &S, QualType type, Declarator &declarator,
     if (auto objcClass = type->getAs<ObjCInterfaceType>()) {
       if (objcClass->getInterface()->getIdentifier() == S.getNSErrorIdent()) {
         if (numNormalPointers == 2 && numTypeSpecifierPointers < 2)
-          return PointerDeclaratorKind::NSErrorPointerPointer;;
+          return PointerDeclaratorKind::NSErrorPointerPointer;
       }
 
       break;