From c202b2809ac814bcae8553cd772ec4901fdb8441 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Sat, 14 Apr 2012 00:33:13 +0000 Subject: Add an AttributedStmt type to represent a statement with C++11 attributes attached. Since we do not support any attributes which appertain to a statement (yet), testing of this is necessarily quite minimal. Patch by Alexander Kornienko! llvm-svn: 154723 --- clang/lib/Serialization/ASTWriterStmt.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp') diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index 827caa026a4..1e312114631 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -106,6 +106,14 @@ void ASTStmtWriter::VisitLabelStmt(LabelStmt *S) { Code = serialization::STMT_LABEL; } +void ASTStmtWriter::VisitAttributedStmt(AttributedStmt *S) { + VisitStmt(S); + Writer.WriteAttributes(S->getAttrs(), Record); + Writer.AddStmt(S->getSubStmt()); + Writer.AddSourceLocation(S->getAttrLoc(), Record); + Code = serialization::STMT_ATTRIBUTED; +} + void ASTStmtWriter::VisitIfStmt(IfStmt *S) { VisitStmt(S); Writer.AddDeclRef(S->getConditionVariable(), Record); -- cgit v1.2.3