Use cast instead of dyn_cast_or_null.
authorAkira Hatanaka <ahatanaka@apple.com>
Wed, 20 Jun 2018 22:56:59 +0000 (22:56 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Wed, 20 Jun 2018 22:56:59 +0000 (22:56 +0000)
This addresses John's post-commit review feedback.

https://reviews.llvm.org/rC335021#inline-2038

llvm-svn: 335189

clang/lib/Sema/SemaDeclCXX.cpp

index f397949..822d5ef 100644 (file)
@@ -7832,7 +7832,7 @@ void Sema::ActOnFinishCXXMemberSpecification(Scope* S, SourceLocation RLoc,
               reinterpret_cast<Decl**>(FieldCollector->getCurFields()),
               FieldCollector->getCurNumFields()), LBrac, RBrac, AttrList);
 
-  CheckCompletedCXXClass(dyn_cast_or_null<CXXRecordDecl>(TagDecl));
+  CheckCompletedCXXClass(cast<CXXRecordDecl>(TagDecl));
 }
 
 /// AddImplicitlyDeclaredMembersToClass - Adds any implicitly-declared