aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/SemaDecl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 189b3d94e2..03d18d402d 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -8449,9 +8449,9 @@ bool Sema::canSkipFunctionBody(Decl *D) {
}
Decl *Sema::ActOnSkippedFunctionBody(Decl *Decl) {
- if (FunctionDecl *FD = dyn_cast<FunctionDecl>(Decl))
+ if (FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(Decl))
FD->setHasSkippedBody();
- else if (ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(Decl))
+ else if (ObjCMethodDecl *MD = dyn_cast_or_null<ObjCMethodDecl>(Decl))
MD->setHasSkippedBody();
return ActOnFinishFunctionBody(Decl, 0);
}