[clang] 073dbaa - Fix GCC warnings. NFC.

Michael Liao via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 8 10:00:55 PDT 2020


Author: Michael Liao
Date: 2020-03-08T13:00:36-04:00
New Revision: 073dbaae39724ea860b5957fe47ecc1c2a84b197

URL: https://github.com/llvm/llvm-project/commit/073dbaae39724ea860b5957fe47ecc1c2a84b197
DIFF: https://github.com/llvm/llvm-project/commit/073dbaae39724ea860b5957fe47ecc1c2a84b197.diff

LOG: Fix GCC warnings. NFC.

Added: 
    

Modified: 
    clang/lib/AST/ItaniumMangle.cpp
    clang/lib/Index/USRGeneration.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp
index 5cc66a0a5778..63e34653637e 100644
--- a/clang/lib/AST/ItaniumMangle.cpp
+++ b/clang/lib/AST/ItaniumMangle.cpp
@@ -641,7 +641,7 @@ void CXXNameMangler::mangle(GlobalDecl GD) {
   //            ::= <data name>
   //            ::= <special-name>
   Out << "_Z";
-  if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(GD.getDecl()))
+  if (isa<FunctionDecl>(GD.getDecl()))
     mangleFunctionEncoding(GD);
   else if (const VarDecl *VD = dyn_cast<VarDecl>(GD.getDecl()))
     mangleName(VD);

diff  --git a/clang/lib/Index/USRGeneration.cpp b/clang/lib/Index/USRGeneration.cpp
index f3eb653f10fa..7972d0a047c2 100644
--- a/clang/lib/Index/USRGeneration.cpp
+++ b/clang/lib/Index/USRGeneration.cpp
@@ -388,7 +388,7 @@ static const ObjCCategoryDecl *getCategoryContext(const NamedDecl *D) {
   if (auto *ICD = dyn_cast<ObjCCategoryImplDecl>(D->getDeclContext()))
     return ICD->getCategoryDecl();
   return nullptr;
-};
+}
 
 void USRGenerator::VisitObjCMethodDecl(const ObjCMethodDecl *D) {
   const DeclContext *container = D->getDeclContext();


        


More information about the cfe-commits mailing list