r349955 - Switch from static_cast<> to cast<>, update identifier for coding conventions; NFC.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 21 13:11:37 PST 2018


Author: aaronballman
Date: Fri Dec 21 13:11:36 2018
New Revision: 349955

URL: http://llvm.org/viewvc/llvm-project?rev=349955&view=rev
Log:
Switch from static_cast<> to cast<>, update identifier for coding conventions; NFC.

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

Modified: cfe/trunk/lib/Sema/SemaStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmt.cpp?rev=349955&r1=349954&r2=349955&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmt.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmt.cpp Fri Dec 21 13:11:36 2018
@@ -469,11 +469,9 @@ Sema::ActOnCaseStmt(SourceLocation CaseL
 }
 
 /// ActOnCaseStmtBody - This installs a statement as the body of a case.
-void Sema::ActOnCaseStmtBody(Stmt *caseStmt, Stmt *SubStmt) {
+void Sema::ActOnCaseStmtBody(Stmt *S, Stmt *SubStmt) {
   DiagnoseUnusedExprResult(SubStmt);
-
-  auto *CS = static_cast<CaseStmt *>(caseStmt);
-  CS->setSubStmt(SubStmt);
+  cast<CaseStmt>(S)->setSubStmt(SubStmt);
 }
 
 StmtResult




More information about the cfe-commits mailing list