diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:00:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:00:23 +0000 |
commit | 6252156da5066bd47f63f8bd40404d1f89909d32 (patch) | |
tree | 743d1b59945b071890dc19b6bf5e9d3ff0d1399b /lib/Sema/SemaDecl.cpp | |
parent | 461a67fa15370a9ec88f8f8a240bf7c123bb2029 (diff) |
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index ec5ca6973568..a1fc725f8df4 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -10671,7 +10671,7 @@ void Sema::ActOnUninitializedDecl(Decl *RealDecl) { // that has an in-class initializer, so we type-check this like // a declaration. // - // Fall through + LLVM_FALLTHROUGH; case VarDecl::DeclarationOnly: // It's only a declaration. @@ -12179,9 +12179,11 @@ bool Sema::canSkipFunctionBody(Decl *D) { } Decl *Sema::ActOnSkippedFunctionBody(Decl *Decl) { - if (FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(Decl)) + if (!Decl) + return nullptr; + if (FunctionDecl *FD = Decl->getAsFunction()) FD->setHasSkippedBody(); - else if (ObjCMethodDecl *MD = dyn_cast_or_null<ObjCMethodDecl>(Decl)) + else if (ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(Decl)) MD->setHasSkippedBody(); return Decl; } |