Author: Dmitri Gribenko
Date: 2019-12-20T14:36:21+01:00
New Revision: 9caf12e8495c1106dd3d1079892ce4f39f91b7d2

URL: 
https://github.com/llvm/llvm-project/commit/9caf12e8495c1106dd3d1079892ce4f39f91b7d2
DIFF: 
https://github.com/llvm/llvm-project/commit/9caf12e8495c1106dd3d1079892ce4f39f91b7d2.diff

LOG: Use isa instead of dyn_cast

Added: 
    

Modified: 
    clang/lib/Tooling/Syntax/Mutations.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Tooling/Syntax/Mutations.cpp 
b/clang/lib/Tooling/Syntax/Mutations.cpp
index a34598c99f7f..7278aff5f18b 100644
--- a/clang/lib/Tooling/Syntax/Mutations.cpp
+++ b/clang/lib/Tooling/Syntax/Mutations.cpp
@@ -71,7 +71,7 @@ class syntax::MutationsImpl {
 void syntax::removeStatement(syntax::Arena &A, syntax::Statement *S) {
   assert(S->canModify());
 
-  if (auto *Parent = llvm::dyn_cast<CompoundStatement>(S->parent())) {
+  if (isa<CompoundStatement>(S->parent())) {
     // A child of CompoundStatement can just be safely removed.
     MutationsImpl::remove(S);
     return;


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to