summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-05-03 16:53:59 +0000
committerdim <dim@FreeBSD.org>2012-05-03 16:53:59 +0000
commit822bde9df508e0b9afac5e581b0d6ab403417a28 (patch)
tree2e51705e103e92c7be1b21e8bd8ffd5b5d0e4d52 /lib/Sema/SemaStmt.cpp
parent50b73317314e889cf39c7b1d6cbf419fa7502f22 (diff)
downloadFreeBSD-src-822bde9df508e0b9afac5e581b0d6ab403417a28.zip
FreeBSD-src-822bde9df508e0b9afac5e581b0d6ab403417a28.tar.gz
Vendor import of clang release_31 branch r155985:
http://llvm.org/svn/llvm-project/cfe/branches/release_31@155985
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r--lib/Sema/SemaStmt.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 97c8eb0..9052278 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -345,7 +345,6 @@ Sema::ActOnDefaultStmt(SourceLocation DefaultLoc, SourceLocation ColonLoc,
StmtResult
Sema::ActOnLabelStmt(SourceLocation IdentLoc, LabelDecl *TheDecl,
SourceLocation ColonLoc, Stmt *SubStmt) {
-
// If the label was multiply defined, reject it now.
if (TheDecl->getStmt()) {
Diag(IdentLoc, diag::err_redefinition_of_label) << TheDecl->getDeclName();
@@ -361,6 +360,16 @@ Sema::ActOnLabelStmt(SourceLocation IdentLoc, LabelDecl *TheDecl,
return Owned(LS);
}
+StmtResult Sema::ActOnAttributedStmt(SourceLocation AttrLoc,
+ const AttrVec &Attrs,
+ Stmt *SubStmt) {
+ // Fill in the declaration and return it. Variable length will require to
+ // change this to AttributedStmt::Create(Context, ....);
+ // and probably using ArrayRef
+ AttributedStmt *LS = new (Context) AttributedStmt(AttrLoc, Attrs, SubStmt);
+ return Owned(LS);
+}
+
StmtResult
Sema::ActOnIfStmt(SourceLocation IfLoc, FullExprArg CondVal, Decl *CondVar,
Stmt *thenStmt, SourceLocation ElseLoc,
OpenPOWER on IntegriCloud