Skip to content

Commit 2f94a21

Browse files
committed
Sema: Change cast to use dyn_cast instead of dyn_cast_or_null
1 parent 1a1e770 commit 2f94a21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/CSDiagnostics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ bool AssignmentFailure::diagnoseAsError() {
10081008
// Otherwise, we cannot resolve this because the available setter candidates
10091009
// are all mutating and the base must be mutating. If we dug out a
10101010
// problematic decl, we can produce a nice tailored diagnostic.
1011-
if (auto *VD = dyn_cast_or_null<VarDecl>(choice->getDecl())) {
1011+
if (auto *VD = dyn_cast<VarDecl>(choice->getDecl())) {
10121012
std::string message = "'";
10131013
message += VD->getName().str().str();
10141014
message += "'";

0 commit comments

Comments
 (0)