r335189 - Use cast instead of dyn_cast_or_null.

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 20 15:57:00 PDT 2018


Author: ahatanak
Date: Wed Jun 20 15:56:59 2018
New Revision: 335189

URL: http://llvm.org/viewvc/llvm-project?rev=335189&view=rev
Log:
Use cast instead of dyn_cast_or_null.

This addresses John's post-commit review feedback.

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

Modified:
    cfe/trunk/lib/Sema/SemaDeclCXX.cpp

Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=335189&r1=335188&r2=335189&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Wed Jun 20 15:56:59 2018
@@ -7832,7 +7832,7 @@ void Sema::ActOnFinishCXXMemberSpecifica
               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




More information about the cfe-commits mailing list