aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-12-06 18:59:10 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-12-06 18:59:10 +0000
commit35f3f36cb9451f347b83a6e7f01e3c702df4732d (patch)
treed71220afa445888c85ee7862f0117404a0acc6b8 /lib/Sema/SemaDecl.cpp
parentc39f9fa39c472a6663111788b89c67fd365271d8 (diff)
Add a bit on FunctionDecl/ObjCMethodDecl to indicate if there was a body
that was skipped by the parser. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169531 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 102a6ae9a2..9dd7779537 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -8016,6 +8016,14 @@ bool Sema::canSkipFunctionBody(Decl *D) {
return !FD->isConstexpr();
}
+Decl *Sema::ActOnSkippedFunctionBody(Decl *Decl) {
+ if (FunctionDecl *FD = dyn_cast<FunctionDecl>(Decl))
+ FD->setHasSkippedBody();
+ else if (ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(Decl))
+ MD->setHasSkippedBody();
+ return ActOnFinishFunctionBody(Decl, 0);
+}
+
Decl *Sema::ActOnFinishFunctionBody(Decl *D, Stmt *BodyArg) {
return ActOnFinishFunctionBody(D, BodyArg, false);
}