[clang] 326c39b - [clang][NFC] Remove redundant cast

Raphael Isemann via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 24 02:08:00 PST 2020


Author: Raphael Isemann
Date: 2020-01-24T11:07:33+01:00
New Revision: 326c39b569e385b35cc117a31a3b20919c799352

URL: https://github.com/llvm/llvm-project/commit/326c39b569e385b35cc117a31a3b20919c799352
DIFF: https://github.com/llvm/llvm-project/commit/326c39b569e385b35cc117a31a3b20919c799352.diff

LOG: [clang][NFC] Remove redundant cast

This cast just casts Decl* to Decl*.

Added: 
    

Modified: 
    clang/lib/AST/ASTImporter.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp
index 9dd20e2d5921..dc8d7bf5064e 100644
--- a/clang/lib/AST/ASTImporter.cpp
+++ b/clang/lib/AST/ASTImporter.cpp
@@ -1753,7 +1753,7 @@ ASTNodeImporter::ImportDeclContext(DeclContext *FromDC, bool ForceImport) {
     // fix since operations such as code generation will expect this to be so.
     if (ImportedOrErr) {
       FieldDecl *FieldFrom = dyn_cast_or_null<FieldDecl>(From);
-      Decl *ImportedDecl = (Decl*)*ImportedOrErr;
+      Decl *ImportedDecl = *ImportedOrErr;
       FieldDecl *FieldTo = dyn_cast_or_null<FieldDecl>(ImportedDecl);
       if (FieldFrom && FieldTo) {
         const RecordType *RecordFrom = FieldFrom->getType()->getAs<RecordType>();


        


More information about the cfe-commits mailing list